[PATCH v4 0/5] Series short description

Eric Pouech eric.pouech at gmail.com
Mon Feb 21 01:34:05 CST 2022


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
  + a couple of programs moved into the GUI subsystem (to avoid console
    creation on invocation)
  + 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

V3 => V4:
- included Jacek's comments:
  + removed unneeded casts
  + move CreateProcess change in programs/services into a separate patch
  + I didn't change programs/start as you suggested. Testing on W10 shows
    that 'start /b cui.exe' from a cmd prompt just reuses the current
    console.

And Marvin will generate errors for Chinese and Japanese VM in console
testing that are independant of this serie.

Signed-off-by: Eric Pouech <eric.pouech at gmail.com>
---

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
      programs/services: start services detached from console
      dlls/kernelbase: handle corner case in CreateProcess


 dlls/kernel32/tests/console.c    | 85 ++++++++++++++++++++++++++++++++
 dlls/kernelbase/process.c        |  6 ++-
 programs/services/services.c     |  2 +-
 programs/uninstaller/Makefile.in |  2 +-
 programs/wusa/Makefile.in        |  2 +-
 5 files changed, 93 insertions(+), 4 deletions(-)




More information about the wine-devel mailing list