https://bugs.winehq.org/show_bug.cgi?id=57600
Bug ID: 57600 Summary: Application not showing console output Product: Wine Version: 10.0-rc3 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: ntdll Assignee: wine-bugs@winehq.org Reporter: angel.narvaez@civiceye.com Distribution: ---
Created attachment 77715 --> https://bugs.winehq.org/attachment.cgi?id=77715 wine8 vs wine9
I'm running into an issue where an application that can be started from explorer.exe or cmd.exe is not showing the console output to the unix console. The "buggy" behavior is present in wine v9, but wine v8 shows the console output just fine. I believe the related change is in this commit: https://gitlab.winehq.org/wine/wine/-/commit/4b63e888945b8ada2ddc043e435b935...
In the commit, it is stated that this behavior can be achieved by starting the app with "./wine app | cat", however that does not seem to be working with wine or wineconsole (Please see attachments)
When using WINEDEBUG=+console, I can see the application interacting and writing to the windows console, however nothing is shown on the screen. I need guidance on this issue.
https://bugs.winehq.org/show_bug.cgi?id=57600
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression CC| |eric.pouech@gmail.com Regression SHA1| |4b63e888945b8ada2ddc043e435 | |b9358a0be811c
https://bugs.winehq.org/show_bug.cgi?id=57600
--- Comment #1 from Eric Pouech eric.pouech@gmail.com --- two points: - when running the same app in windows, from cmd.exe "console", does the log appear in the console? (wine9 is closer to Windows behavior than win8 was regarding console inheritance between processes) - if logs does appear in previous bullet point, the wine9 picture reads 'wineconsole <app> | cat' it should read 'wine <app> | cat (just it case, as your comment states that you tried both wine and wineconsole)
https://bugs.winehq.org/show_bug.cgi?id=57600
--- Comment #2 from Angel angel.narvaez@civiceye.com --- 1. When opening the app in windows from cmd.exe, cmd.exe spawns a new console window where the app/log is showing 2. Yes. I did try wine <app> | cat.
I'm attaching a couple of screenshots (one of the app running under windows, and one of the app running under wine). I think you are correct in that wine9 seems to match the Windows behavior closer than wine8 for console inheritance since both platforms create a new windows console window. I just seems odd that wine <app> | cat doesn't produce the console output.
One thing I had tried when I filed a ticket in crossover is this: ----------------- I downloaded the source to my machine and reverted the changes to dlls/ntdll/unix/env.c in the commit (https://gitlab.winehq.org/wine/wine/-/commit/4b63e888945b8ada2ddc043e435b935...).
After recompiling and running with "wine app | cat" the unix console does show the output as expected. -----------------
Not sure if this change would affect console inheritance behavior or not but it does produce the desired output ????
https://bugs.winehq.org/show_bug.cgi?id=57600
--- Comment #3 from Eric Pouech eric.pouech@gmail.com --- what likely happens is that your app is made of a main engine.exe (which is tagged in the GUI subsystem) and which spawns a child .exe (which is tagged in the CUI subsystem).
engine.exe is started from a shell (which is attached to a console).
The Windows behavior is, when spawning a child process (default behavior): - if parent is attached to a console and child belong to CUI subsystem, the parent's console is inherited by child - if parent is not attached to a console and child belong to CUI subsystem, a new console is created for child - if child belong to GUI subsystem, child is started without any console (whatever the parent's state)
so your app behavior under windows is: shell (console) > engine.exe (no console as GUI) > child.exe (creates a new console)
Wine8 was inheriting the shell console when spawning engine.exe, and also the child Wine9 has been fixed to implement the Windows behavior (so engine.exe is started without console)
when we write that "./wine app | cat" should capture the output into the starting console, it should be under the condition that <app> belongs to the CUI subsystem
since Wine's behavior is now how Windows behaves, we won't change this (or revert the mentionned patch).
I don't see a way to achieve what you'd like from Wine. Maybe your app has some options to redirect log to a file or a pipe that you could use
https://bugs.winehq.org/show_bug.cgi?id=57600
--- Comment #4 from Angel angel.narvaez@civiceye.com --- Yes. This makes sense to me. Thank you for clarifying! :)
https://bugs.winehq.org/show_bug.cgi?id=57600
--- Comment #5 from Eric Pouech eric.pouech@gmail.com --- Angel,
I'm about to close this bug as WONTFIX (for the reasons explained in #3) If you have further comments, discrepancies between Wine & Windows that you want to mention, it's time to jump in! Otherwise, it's going to be closed in a couple of days. TIA