http://bugs.winehq.org/show_bug.cgi?id=23596
Summary: stderr not displaying when invoking native linux commands Product: Wine Version: 1.2-rc7 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: jarekczek@poczta.onet.pl
Try running /bin/grep You should get a short usage note, like on unix. You get nothing.
http://bugs.winehq.org/show_bug.cgi?id=23596
Jarek jarekczek@poczta.onet.pl changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jarekczek@poczta.onet.pl
http://bugs.winehq.org/show_bug.cgi?id=23596
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|jarekczek@poczta.onet.pl |
--- Comment #1 from Dmitry Timoshkov dmitry@codeweavers.com 2010-07-11 02:33:06 --- (In reply to comment #0)
Try running /bin/grep
Run from where? And why?
http://bugs.winehq.org/show_bug.cgi?id=23596
--- Comment #2 from Jarek jarekczek@poczta.onet.pl 2010-07-11 08:08:51 ---
From cmd.exe, to illustrate wine wrong behaviour.
http://bugs.winehq.org/show_bug.cgi?id=23596
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #3 from Vitaliy Margolen vitaliy@kievinfo.com 2010-07-11 18:48:35 --- Confirming. Probably a dup of other console related bugs. Wine doesn't redirect stdout/stderr well.
http://bugs.winehq.org/show_bug.cgi?id=23596
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |programs Summary|stderr not displaying when |stderr not displaying when |invoking native linux |invoking native linux |commands |commands from cmd.exe
http://bugs.winehq.org/show_bug.cgi?id=23596
Eric Pouech eric.pouech@orange.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |eric.pouech@orange.fr Component|programs |cmd
--- Comment #4 from Eric Pouech eric.pouech@orange.fr 2010-07-13 15:30:17 --- absolutely not!!!! it's not a console bug
using "/bin/grep -v" just works fine here and gets a nice output: Z:\home\eric\work\output-wine\wine64>Usage: /bin/grep [OPTION]... MOTIF [FICHIER]... Pour en savoir davantage, faites: « /bin/grep --help ».
It's a bug in cmd parsing which gets confused by a command
In order to test, commenting out if (!(*param1) && !(*param2)) return; in programs/cmd/wcmdmain.c, WCMD_run_program() makes things work as expected
But I'd rather think WCMD_parse_cmd is to blame (and confuses /bin/grep as both the program name and the first option)
hence changing component in bugzilla
A+
http://bugs.winehq.org/show_bug.cgi?id=23596
--- Comment #5 from Jarek jarekczek@poczta.onet.pl 2010-07-14 00:55:08 --- Actually I did not intend to run grep from cmd.exe, but from windows app that captures standard error. For example calling linux ant from windows editor EditPad Pro (as a configurable tool). There "/bin/grep -v" doesn't work. I'll have to find a simpler environment to show this.
By this time I see that running from cmd.exe /bin/grep -v 2>test.txt makes the output go to the screen instead of the file. /bin/grep -v >test1.txt 2>test.txt - exactly the same, output to screen
Should it be reported as another bug?
http://bugs.winehq.org/show_bug.cgi?id=23596
--- Comment #6 from Eric Pouech eric.pouech@orange.fr 2010-07-14 04:15:22 --- to be complete on this, there are actually two bugs: - the first I described in #4 - the second one which corresponds to use case in #5. This one is another wrong assumption in cmd.exe. Cmd only uses the msvcrt inheritance mechanism for file redirection, which is correct for any program linked to msvcrt (and doing its I/O with msvcrt), but is wrong in the other cases (like using /bin/grep). Currently CreateProcess correctly manages inheritance though handles for a Unix exec (as a child), but it doesn't for msvcrt inheritance mechanism. However, as from CreateProcess point of the reserved fields in STARTUPINFO have to be considered as a black box (it's actually used by some programs to pass information from parent to child), I'd rather think cmd should take care of this very problem.
A+
http://bugs.winehq.org/show_bug.cgi?id=23596
Jarek jarekczek@poczta.onet.pl changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jarekczek@poczta.onet.pl
http://bugs.winehq.org/show_bug.cgi?id=23596
atohom@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |atohom@gmail.com
--- Comment #7 from atohom@gmail.com 2011-01-30 21:40:14 CST --- I think this bug is unrelated to cmd, it seems to be a bug in fork_and_exec function, there is code to set stdin and stdout but for stderr there is none.
http://bugs.winehq.org/show_bug.cgi?id=23596
Vijay Kamuju infyquest@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |infyquest@gmail.com
--- Comment #8 from Vijay Kamuju infyquest@gmail.com 2011-09-09 15:37:41 CDT --- please test with wine 1.3.28
http://bugs.winehq.org/show_bug.cgi?id=23596
--- Comment #9 from Jarek jarekczek@poczta.onet.pl 2011-09-10 08:13:57 CDT --- /bin/grep -v runs ok. I see the output and can redirect it with 2>file.txt
But /bin/grep still gives no output. As Eric pointed (#4) it's a different bug. Will we file it separately?
Checked on today's git. Do you get the same? If not I could try getting absolutely new git repository.
http://bugs.winehq.org/show_bug.cgi?id=23596
Joerg Schiermeier mywine@schiermeier-software.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mywine@schiermeier-software | |.de
--- Comment #10 from Joerg Schiermeier mywine@schiermeier-software.de 2011-11-24 20:47:37 CST --- (In reply to comment #9)
/bin/grep -v runs ok. I see the output and can redirect it with 2>file.txt
I can see also the output. But I have to hit ENTER to get the DOS-Prompt back. Is this ok?
http://bugs.winehq.org/show_bug.cgi?id=23596
--- Comment #11 from Eric Pouech eric.pouech@orange.fr 2011-11-26 13:17:35 CST --- or issue in#9 (and in reply to #10), likely a similar case of bug #28192 (even it does apply here to a different kind of executable) for the remaining part of #9 (/bin/grep without parameter) it's a bug in cmd, I'll send a patch shortly however, please not that this behavior will only work with bare consoles (eg wine cmd...) but won't work with wineconsole (as we don't know yet to redirect a unix pipe to wineconsole). That should be a separate bug report A+
http://bugs.winehq.org/show_bug.cgi?id=23596
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download
--- Comment #12 from Austin English austinenglish@gmail.com 2013-12-05 17:41:09 CST --- With wine-1.7.7-199-g608b1e1: austin@aw25 ~ $ wine cmd Z:\home\austin>/bin/grep Can't recognize '/bin/grep' as an internal or external command, or batch script.
This is a regression, with wine-1.3.14, I at least get nothing: austin@aw25 ~ $ /opt/oldwine/wine-1.3.14/bin/wine cmd Z:\home\austin>/bin/grep
wineconsole doesn't display fonts for me, but that's a separate issue. Looking into it.
http://bugs.winehq.org/show_bug.cgi?id=23596
Jason Edmeades us@edmeades.me.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |us@edmeades.me.uk
--- Comment #13 from Jason Edmeades us@edmeades.me.uk 2013-12-09 03:20:06 CST --- Actually that last bit is probably bug 34730 which is a 'regression' (patch to fix it back is on that bug) - my concern with it is whether we should be having functionality that windows obviously doesnt support, and worse wine cmd cannot support 'properly' (we always end up running it without waiting for a response)
https://bugs.winehq.org/show_bug.cgi?id=23596
winetest@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |winetest@luukku.com
--- Comment #14 from winetest@luukku.com --- wine cmd /bin/grep
Can't recognize '/bin/grep' as an internal or external command, or batch script.
wine 2.0.rc2.
https://bugs.winehq.org/show_bug.cgi?id=23596
Janne janne.kekkonen@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |janne.kekkonen@gmail.com
--- Comment #15 from Janne janne.kekkonen@gmail.com --- Tested with wine 9.0.
Same functionality as in wine 2.0.rc2
wine --version
wine-9.0 (Ubuntu 9.0~repack-4build3)
wine cmd
Microsoft Windows 6.1.7601
C:\temp>/bin/grep Can't recognize '/bin/grep' as an internal or external command, or batch script.
C:\temp>