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+