https://bugs.winehq.org/show_bug.cgi?id=52761
--- Comment #12 from Eric Pouech eric.pouech@orange.fr --- (In reply to Esme Povirk from comment #11)
Is there any way I can start mscoree_test.exe on Windows that's analogous to starting it this way (with no console and redirected std*) in Wine? If so, I should test that on Windows to see if it creates cmd windows (which would mean this is correct behavior and I should fix the CI). If not, then it's a broken state and Wine shouldn't do that or at the very least we should never start Wine that way.
CreateProcess with DETACHED_PROCESS flag the difference between wine and windows: - under windows, when launching mscoree_test.exe, as it belongs to the CUI subsystem, Windows create a console and attaches the process to it. this console is then interited by all child process (if any) - under wine, when launching mscore_test.exe + if wine detects a tty (A), Wine creates a windows's console attached to the unix tty (== where the shell inputs / outputs), and we're in a similar situation as on windows + otherwise, Wine doesn't create any console. in your case, subsequent creation of child process (since there's no console) will generate the creation of new console (B) (which fails as DISPLAY is unset)
(A) the detection is made whether at least one of input stream (fd=0), output stream (fd=1) or error stream (fd=2) points to the tty (where the shell inputs/outputs) in #1, as 0=/dev/null, 1,2=log => the detection fails (B) there are several kind of consoles on wine to make things nicer. Either it transparently inputs/outputs to a unix tty; or it creates a windows (user32.dll). The first kind should work (even when DISPLAY is unset). Second requires a graphic driver (either X11 when DISPLAY is set, or as Jacek #8 to use a null graphic driver)