Hi Brendan,
On 6/15/21 1:17 PM, Brendan McGrath wrote:
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51264 Signed-off-by: Brendan McGrath brendan@redmandi.com
Changes since v1:
Correct the Wine-Bug reference
dlls/kernelbase/process.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/kernelbase/process.c b/dlls/kernelbase/process.c index e3bd5feb296c..2833e76138bf 100644 --- a/dlls/kernelbase/process.c +++ b/dlls/kernelbase/process.c @@ -141,8 +141,8 @@ static WCHAR *get_file_name( WCHAR *cmdline, WCHAR *buffer, DWORD buflen )
create_process_params
*/ static RTL_USER_PROCESS_PARAMETERS *create_process_params( const WCHAR *filename, const WCHAR *cmdline,
const WCHAR *cur_dir, void *env, DWORD flags,
const STARTUPINFOW *startup )
const WCHAR *cur_dir, void *env, BOOL inherit,
{ RTL_USER_PROCESS_PARAMETERS *params; UNICODE_STRING imageW, curdirW, cmdlineW, titleW, desktopW, runtimeW, newdirW;DWORD flags, const STARTUPINFOW *startup )
@@ -199,7 +199,7 @@ static RTL_USER_PROCESS_PARAMETERS *create_process_params( const WCHAR *filename params->hStdOutput = startup->hStdOutput; params->hStdError = startup->hStdError; }
- else if (flags & DETACHED_PROCESS)
- else if (flags & DETACHED_PROCESS || ((flags & CREATE_NEW_CONSOLE) && !inherit) )
Is the !inherit condition needed here? If CreateProcess (modern) part of [1] is correct, we could probably use that branch for CREATE_NEW_CONSOLE regardless of inherit value. It would be great to have a test that directly uses CreateProcess() instead of ShellExecuteEx() so that we can verify that.
Thanks,
Jacek
[1] https://github.com/rprichard/win32-console-docs/blob/master/README.md