Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6bcc1b92
Commit
6bcc1b92
authored
Sep 21, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 21, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Pass RTL_USER_PROCESS_PARAMETERS to get_initial_console.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ef57a8df
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
12 deletions
+11
-12
env.c
dlls/ntdll/env.c
+1
-2
env.c
dlls/ntdll/unix/env.c
+6
-6
unix_private.h
dlls/ntdll/unix/unix_private.h
+1
-1
unixlib.h
dlls/ntdll/unixlib.h
+2
-3
condrv.h
include/wine/condrv.h
+1
-0
No files found.
dlls/ntdll/env.c
View file @
6bcc1b92
...
@@ -1254,8 +1254,7 @@ void init_user_process_params(void)
...
@@ -1254,8 +1254,7 @@ void init_user_process_params(void)
RtlFreeUnicodeString
(
&
cmdline
);
RtlFreeUnicodeString
(
&
cmdline
);
RtlReleasePath
(
load_path
);
RtlReleasePath
(
load_path
);
unix_funcs
->
get_initial_console
(
&
params
->
ConsoleHandle
,
&
params
->
hStdInput
,
unix_funcs
->
get_initial_console
(
params
);
&
params
->
hStdOutput
,
&
params
->
hStdError
);
params
->
wShowWindow
=
1
;
/* SW_SHOWNORMAL */
params
->
wShowWindow
=
1
;
/* SW_SHOWNORMAL */
run_wineboot
(
&
params
->
Environment
);
run_wineboot
(
&
params
->
Environment
);
...
...
dlls/ntdll/unix/env.c
View file @
6bcc1b92
...
@@ -55,6 +55,7 @@
...
@@ -55,6 +55,7 @@
#include "winternl.h"
#include "winternl.h"
#include "winbase.h"
#include "winbase.h"
#include "winnls.h"
#include "winnls.h"
#include "wine/condrv.h"
#include "wine/debug.h"
#include "wine/debug.h"
#include "unix_private.h"
#include "unix_private.h"
...
@@ -1151,13 +1152,12 @@ NTSTATUS CDECL get_dynamic_environment( WCHAR *env, SIZE_T *size )
...
@@ -1151,13 +1152,12 @@ NTSTATUS CDECL get_dynamic_environment( WCHAR *env, SIZE_T *size )
*
*
* Return the initial console handles.
* Return the initial console handles.
*/
*/
void
CDECL
get_initial_console
(
HANDLE
*
handle
,
HANDLE
*
std_in
,
HANDLE
*
std_out
,
HANDLE
*
std_err
)
void
CDECL
get_initial_console
(
RTL_USER_PROCESS_PARAMETERS
*
params
)
{
{
*
handle
=
*
std_in
=
*
std_out
=
*
std_err
=
0
;
if
(
isatty
(
0
)
||
isatty
(
1
)
||
isatty
(
2
))
params
->
ConsoleHandle
=
CONSOLE_HANDLE_SHELL
;
if
(
isatty
(
0
)
||
isatty
(
1
)
||
isatty
(
2
))
*
handle
=
(
HANDLE
)
2
;
/* see kernel32/kernel_private.h */
if
(
!
isatty
(
0
))
wine_server_fd_to_handle
(
0
,
GENERIC_READ
|
SYNCHRONIZE
,
OBJ_INHERIT
,
&
params
->
hStdInput
);
if
(
!
isatty
(
0
))
wine_server_fd_to_handle
(
0
,
GENERIC_READ
|
SYNCHRONIZE
,
OBJ_INHERIT
,
std_in
);
if
(
!
isatty
(
1
))
wine_server_fd_to_handle
(
1
,
GENERIC_WRITE
|
SYNCHRONIZE
,
OBJ_INHERIT
,
&
params
->
hStdOutput
);
if
(
!
isatty
(
1
))
wine_server_fd_to_handle
(
1
,
GENERIC_WRITE
|
SYNCHRONIZE
,
OBJ_INHERIT
,
std_out
);
if
(
!
isatty
(
2
))
wine_server_fd_to_handle
(
2
,
GENERIC_WRITE
|
SYNCHRONIZE
,
OBJ_INHERIT
,
&
params
->
hStdError
);
if
(
!
isatty
(
2
))
wine_server_fd_to_handle
(
2
,
GENERIC_WRITE
|
SYNCHRONIZE
,
OBJ_INHERIT
,
std_err
);
}
}
...
...
dlls/ntdll/unix/unix_private.h
View file @
6bcc1b92
...
@@ -107,7 +107,7 @@ extern NTSTATUS CDECL get_initial_environment( WCHAR **wargv[], WCHAR *env, SIZE
...
@@ -107,7 +107,7 @@ extern NTSTATUS CDECL get_initial_environment( WCHAR **wargv[], WCHAR *env, SIZE
extern
NTSTATUS
CDECL
get_startup_info
(
startup_info_t
*
info
,
SIZE_T
*
total_size
,
SIZE_T
*
info_size
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
CDECL
get_startup_info
(
startup_info_t
*
info
,
SIZE_T
*
total_size
,
SIZE_T
*
info_size
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
CDECL
get_dynamic_environment
(
WCHAR
*
env
,
SIZE_T
*
size
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
CDECL
get_dynamic_environment
(
WCHAR
*
env
,
SIZE_T
*
size
)
DECLSPEC_HIDDEN
;
extern
void
CDECL
get_initial_directory
(
UNICODE_STRING
*
dir
)
DECLSPEC_HIDDEN
;
extern
void
CDECL
get_initial_directory
(
UNICODE_STRING
*
dir
)
DECLSPEC_HIDDEN
;
extern
void
CDECL
get_initial_console
(
HANDLE
*
handle
,
HANDLE
*
std_in
,
HANDLE
*
std_out
,
HANDLE
*
std_err
)
DECLSPEC_HIDDEN
;
extern
void
CDECL
get_initial_console
(
RTL_USER_PROCESS_PARAMETERS
*
params
)
DECLSPEC_HIDDEN
;
extern
USHORT
*
CDECL
get_unix_codepage_data
(
void
)
DECLSPEC_HIDDEN
;
extern
USHORT
*
CDECL
get_unix_codepage_data
(
void
)
DECLSPEC_HIDDEN
;
extern
void
CDECL
get_locales
(
WCHAR
*
sys
,
WCHAR
*
user
)
DECLSPEC_HIDDEN
;
extern
void
CDECL
get_locales
(
WCHAR
*
sys
,
WCHAR
*
user
)
DECLSPEC_HIDDEN
;
extern
void
CDECL
virtual_release_address_space
(
void
)
DECLSPEC_HIDDEN
;
extern
void
CDECL
virtual_release_address_space
(
void
)
DECLSPEC_HIDDEN
;
...
...
dlls/ntdll/unixlib.h
View file @
6bcc1b92
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
struct
_DISPATCHER_CONTEXT
;
struct
_DISPATCHER_CONTEXT
;
/* increment this when you change the function table */
/* increment this when you change the function table */
#define NTDLL_UNIXLIB_VERSION 10
5
#define NTDLL_UNIXLIB_VERSION 10
6
struct
unix_funcs
struct
unix_funcs
{
{
...
@@ -72,8 +72,7 @@ struct unix_funcs
...
@@ -72,8 +72,7 @@ struct unix_funcs
NTSTATUS
(
CDECL
*
get_initial_environment
)(
WCHAR
**
wargv
[],
WCHAR
*
env
,
SIZE_T
*
size
);
NTSTATUS
(
CDECL
*
get_initial_environment
)(
WCHAR
**
wargv
[],
WCHAR
*
env
,
SIZE_T
*
size
);
NTSTATUS
(
CDECL
*
get_startup_info
)(
startup_info_t
*
info
,
SIZE_T
*
total_size
,
SIZE_T
*
info_size
);
NTSTATUS
(
CDECL
*
get_startup_info
)(
startup_info_t
*
info
,
SIZE_T
*
total_size
,
SIZE_T
*
info_size
);
NTSTATUS
(
CDECL
*
get_dynamic_environment
)(
WCHAR
*
env
,
SIZE_T
*
size
);
NTSTATUS
(
CDECL
*
get_dynamic_environment
)(
WCHAR
*
env
,
SIZE_T
*
size
);
void
(
CDECL
*
get_initial_console
)(
HANDLE
*
handle
,
HANDLE
*
std_in
,
void
(
CDECL
*
get_initial_console
)(
RTL_USER_PROCESS_PARAMETERS
*
params
);
HANDLE
*
std_out
,
HANDLE
*
std_err
);
void
(
CDECL
*
get_initial_directory
)(
UNICODE_STRING
*
dir
);
void
(
CDECL
*
get_initial_directory
)(
UNICODE_STRING
*
dir
);
USHORT
*
(
CDECL
*
get_unix_codepage_data
)(
void
);
USHORT
*
(
CDECL
*
get_unix_codepage_data
)(
void
);
void
(
CDECL
*
get_locales
)(
WCHAR
*
sys
,
WCHAR
*
user
);
void
(
CDECL
*
get_locales
)(
WCHAR
*
sys
,
WCHAR
*
user
);
...
...
include/wine/condrv.h
View file @
6bcc1b92
...
@@ -244,5 +244,6 @@ struct condrv_ctrl_event
...
@@ -244,5 +244,6 @@ struct condrv_ctrl_event
/* Wine specific values for console inheritance (params->ConsoleHandle) */
/* Wine specific values for console inheritance (params->ConsoleHandle) */
#define CONSOLE_HANDLE_ALLOC ((HANDLE)1)
#define CONSOLE_HANDLE_ALLOC ((HANDLE)1)
#define CONSOLE_HANDLE_SHELL ((HANDLE)2)
#endif
/* _INC_CONDRV */
#endif
/* _INC_CONDRV */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment