On Thu Jun 8 15:12:44 2023 +0000, eric pouech wrote:
@Jacek: no it doesn't suffice to restrict to shell_no_window. The game fails also when the launcher is run attached to the unix console ( == conhost --unix) AFAICS under windows, a GUI doesn't inherit its parent process' console (whatever the createprocess flags) and its process param's ConsoleHandle is always to NULL (cf kernel32/tests/console.c test_CreateProcessCUI) we do inherit in wine the console handle for keeping the link to unix console (or its absence for shell_no_window). AllocConsole will fail if already attached to a "genuine" console, but will fake that the unix console (conhost --unix or shell_no_window) shouldn't have been inherited
Maybe we can revisit inheriting console by GUI applications. Regardless of Unix console handling, it seems that GUI process should not be attached to parent's console. How about the attached [patch](/uploads/49af7084b2f9f92c244e175b883e6b03/patch.diff)?
While I think that taking shell-no-windows into account in `AttachConsole`, like MR2986, makes sense on its own, I think that we should generally treat proper Unix console just like proper Windows consoles when possible.