[PATCH 0/3] Fix for BZ52048

eric.pouech at gmail.com eric.pouech at gmail.com
Thu Feb 10 08:55:03 CST 2022


https://bugs.winehq.org/show_bug.cgi?id=52048

Basically, when calling CreateProcess with current console inheritance (no 
CREATE_NEW_CONSOLE nor DETACHED_PROCESS), and that the child is a CUI
program, native behaves as if CREATE_NEW_CONSOLE was passed.

builtin doesn't...

this serie:
- adds a test case for this case 
  (which requires to extend makedep to support creation of exe sub-modules)
- fixes kernelbase accordingly
- but also requires to fix the usage of CreateProcess that will now force
  the creation of a console
  + one patch of wow64 redirection (only for CUI executables)
  + after quickly auditing all CreateProcess calls, I fixed a couple of
    them.

---

Eric Pouech (4):
      tools/makedep: extend submodule in testdll to support exe as well as dll
      dlls/kernel32/tests: add tests about CreateProcess on CUI programs with console inheritance
      programs: don't recreate a console when redirecting a program to wow64
      dlls/kernelbase: in CreateProcess, allocate a console for CUI process


 dlls/kernel32/tests/Makefile.in      |  4 ++
 dlls/kernel32/tests/console.c        | 56 ++++++++++++++++++++++++++++
 dlls/kernel32/tests/console_cui.c    | 31 +++++++++++++++
 dlls/kernel32/tests/console_cui.spec |  0
 dlls/kernelbase/process.c            |  6 ++-
 programs/services/services.c         |  2 +-
 programs/uninstaller/main.c          |  6 ++-
 programs/winedbg/winedbg.c           |  3 +-
 programs/wusa/main.c                 |  3 +-
 tools/makedep.c                      | 10 +++--
 10 files changed, 111 insertions(+), 10 deletions(-)
 create mode 100644 dlls/kernel32/tests/console_cui.c
 create mode 100644 dlls/kernel32/tests/console_cui.spec




More information about the wine-devel mailing list