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
1c2fa97e
Commit
1c2fa97e
authored
Apr 09, 2002
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Apr 09, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create new console only if the process is a console application.
parent
5474aa94
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
process.c
scheduler/process.c
+10
-8
No files found.
scheduler/process.c
View file @
1c2fa97e
...
...
@@ -112,6 +112,7 @@ static WCHAR **app_wargv;
static
char
main_exe_name
[
MAX_PATH
];
static
char
*
main_exe_name_ptr
=
main_exe_name
;
static
HANDLE
main_exe_file
;
static
int
main_create_flags
;
unsigned
int
server_startticks
;
...
...
@@ -243,7 +244,6 @@ void PROCESS_CallUserSignalProc( UINT uCode, HMODULE16 hModule )
static
BOOL
process_init
(
char
*
argv
[]
)
{
BOOL
ret
;
int
create_flags
=
0
;
size_t
info_size
=
0
;
handle_t
info
=
0
;
...
...
@@ -272,8 +272,8 @@ static BOOL process_init( char *argv[] )
{
size_t
len
=
wine_server_reply_size
(
reply
);
main_exe_name
[
len
]
=
0
;
main_exe_file
=
reply
->
exe_file
;
create_flags
=
reply
->
create_flags
;
main_exe_file
=
reply
->
exe_file
;
main_
create_flags
=
reply
->
create_flags
;
info_size
=
reply
->
info_size
;
info
=
reply
->
info
;
server_startticks
=
reply
->
server_start
;
...
...
@@ -288,7 +288,7 @@ static BOOL process_init( char *argv[] )
/* Create the process heap */
current_process
.
heap
=
HeapCreate
(
HEAP_GROWABLE
,
0
,
0
);
if
(
create_flags
==
0
&&
if
(
main_
create_flags
==
0
&&
current_startupinfo
.
hStdInput
==
0
&&
current_startupinfo
.
hStdOutput
==
0
&&
current_startupinfo
.
hStdError
==
0
)
...
...
@@ -300,7 +300,7 @@ static BOOL process_init( char *argv[] )
SetStdHandle
(
STD_OUTPUT_HANDLE
,
FILE_DupUnixHandle
(
1
,
GENERIC_WRITE
|
SYNCHRONIZE
,
TRUE
));
SetStdHandle
(
STD_ERROR_HANDLE
,
FILE_DupUnixHandle
(
1
,
GENERIC_WRITE
|
SYNCHRONIZE
,
TRUE
));
}
else
if
(
!
(
create_flags
&
(
DETACHED_PROCESS
|
CREATE_NEW_CONSOLE
)))
else
if
(
!
(
main_
create_flags
&
(
DETACHED_PROCESS
|
CREATE_NEW_CONSOLE
)))
{
SetStdHandle
(
STD_INPUT_HANDLE
,
current_startupinfo
.
hStdInput
);
SetStdHandle
(
STD_OUTPUT_HANDLE
,
current_startupinfo
.
hStdOutput
);
...
...
@@ -322,8 +322,6 @@ static BOOL process_init( char *argv[] )
ret
=
MAIN_MainInit
();
if
(
create_flags
&
CREATE_NEW_CONSOLE
)
AllocConsole
();
return
ret
;
}
...
...
@@ -358,7 +356,11 @@ static void start_process(void)
entry
=
(
LPTHREAD_START_ROUTINE
)((
char
*
)
current_process
.
module
+
PE_HEADER
(
current_process
.
module
)
->
OptionalHeader
.
AddressOfEntryPoint
);
console_app
=
(
PE_HEADER
(
current_process
.
module
)
->
OptionalHeader
.
Subsystem
==
IMAGE_SUBSYSTEM_WINDOWS_CUI
);
if
(
console_app
)
current_process
.
flags
|=
PDB32_CONSOLE_PROC
;
if
(
console_app
)
{
current_process
.
flags
|=
PDB32_CONSOLE_PROC
;
if
(
main_create_flags
&
CREATE_NEW_CONSOLE
)
AllocConsole
();
}
/* Signal the parent process to continue */
SERVER_START_REQ
(
init_process_done
)
...
...
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