As described in bugzilla ticket, when calling CreateProcess: - with "default" console inheritance (no CREATE_NEW_CONSOLE nor DETACHED_PROCESS flags), - when parent is not attached to a console - and when the child's subsystem is CUI , native behaves as if CREATE_NEW_CONSOLE was passed.
builtin doesn't...
this serie: - adds a test case for showing the CUI/GUI discrepancies - fixes kernelbase accordingly - but also requires to fix all usage of CreateProcess in Wine Code that would now generate the creation of a console + one patch of wow64 redirection (only for CUI executables) + when looking to the other usage of CreateProcess, I only convinced myself to adapt one of them
V1 => V2: - don't mess up with the number of patches in the serie - no longer modify makedep for creating cui vs gui test executable, but copy current *_test.exe executable and adapt its subsystem to the need
V2 => V3: - removed the hacks in wow64 redirect, and let programs/uninstaller and programs/wusa belong to the GUI subsystem instead - force console creation for wine initial process when a) none of the unix fd are attached to a TTY, b) the initial process is in CUI subsystem
Note to Jacek: - I still think we may have side effects of this serie. a) with spurious window creation (eg 'wine ping >& out < /dev/null' will generate one, which could be typical in shell scripting), b) will prevent program to run on headless setup (while they used to) - so I put the change for initial process in a separate patch - I'm not convinced at all that the evolution to the initial process is a good choice (if caller isn't attached to a Unix console, it's a bit awkward to end up with creating a graphical console). Furthermore, wineconsole provides thes ability to create a console when needed.
And Marvin will generate errors for Chinese and Japanese VM in console testing that are independant of this serie.
A+ ---
Eric Pouech (5): dlls/kernel32/tests: add some console tests about creating cui vs gui processes programs/wusa: set subsystem to GUI programs/uninstaller: set subsystem to GUI dlls/kernelbase: handle corner case in CreateProcess dlls/ntdll: allocate a console for initial CUI process when not attached to a Unix console
dlls/kernel32/tests/console.c | 85 ++++++++++++++++++++++++++++++++ dlls/kernelbase/process.c | 6 ++- dlls/ntdll/unix/env.c | 2 + programs/services/services.c | 2 +- programs/uninstaller/Makefile.in | 2 +- programs/wusa/Makefile.in | 2 +- 6 files changed, 95 insertions(+), 4 deletions(-)