http://bugs.winehq.org/show_bug.cgi?id=26876
Summary: special file CON not handled correctly Product: Wine Version: 1.3.15 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: shell32 AssignedTo: wine-bugs@winehq.org ReportedBy: stefankriwanek@gmx.net
Created an attachment (id=34269) --> (http://bugs.winehq.org/attachment.cgi?id=34269) test binary
In some applications, it is desirable to temporarily redirect stdout/stderr to a file, and then switch back to the console output. This can be accomplished using the special file "CON", as stated at http://support.microsoft.com/kb/58667/en-us Wine seems not to handle this as windows does:
To reproduce, please compile the following C source or run the attached binary: #include <stdio.h> #include <errno.h> int main() { errno=0; fopen("CON", "w" ); printf("errno: %u\n", errno); errno=0;
freopen("CON", "w", stdout ); printf("errno: %u\n", errno); errno=0;
freopen("CON", "w", stderr ); printf("errno: %u\n", errno); }
On native Windows, this outputs 'errno: 0' into the terminal three times.
On wine, it outputs 'errno: 13' (=EACCESS, permission denied) after the first fopen. The further two output lines get lost. They're not written to named file "CON" either.
I set the severity to normal, since I don't know another way of accessing the console attached to the program, if stdout/stderr were redirected. Also this might affect any SDL program, as re-redirection to the console is recommended there (http://sdl.beuc.net/sdl.wiki/FAQ_Console). (Running SDL apps through wine is convenient during development)
Note: For SDL programs, however, the redirection of stdout and stderr to files can be disabled in the first place by setting the environment variable 'SDL_STDIO_REDIRECT' to '0'.
http://bugs.winehq.org/show_bug.cgi?id=26876
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, testcase
http://bugs.winehq.org/show_bug.cgi?id=26876
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|shell32 |-unknown
http://bugs.winehq.org/show_bug.cgi?id=26876
Jerome Leclanche adys.wh@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |adys.wh@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=26876
Eric Pouech eric.pouech@orange.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |eric.pouech@orange.fr
--- Comment #1 from Eric Pouech eric.pouech@orange.fr 2011-04-23 07:35:10 CDT --- patch sent to wine-patches now output is as on windows A+
http://bugs.winehq.org/show_bug.cgi?id=26876
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #2 from Austin English austinenglish@gmail.com 2011-05-11 13:31:58 CDT --- Fixed by http://source.winehq.org/git/wine.git/commitdiff/8a529d60e285308023bc56e7300...
http://bugs.winehq.org/show_bug.cgi?id=26876
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Alexandre Julliard julliard@winehq.org 2011-05-13 13:33:20 CDT --- Closing bugs fixed in 1.3.20.