Tech Support > Microsoft Windows > Development Resources > CreateProcess and Child stdout redirection
CreateProcess and Child stdout redirection
Posted by BradPitt on March 21st, 2007


Hi everybody
i have problems with stdout redirection via anonymous pipe
i do a child process and a pipe for buffering the child output on the parent
process space and it works if i don't use a pipe on the command line but
if i do a createprocess() "with command.com /D cmd1 | cmd2" as second
argument
redirection doesn't work anymore, seems like the cmd pipe overwrite the pipe
i create on the program
Under linux it does work
If you want to see the code i can paste it
The strange thing is that my code works (the stdout is forwarded to the pipe
handle and so to parent process)
if there is no '|' on the command i put on CreateProcess()
Any help wuold be appreciated.
Bye


Posted by JussiJ on March 21st, 2007


On Mar 22, 5:40 am, "BradPitt" <fazz...@NOSPAMhotmail.com> wrote:

This may not fix the problem, but I would suggest not
using the command.com as this is the MS-DOS command
line interpreter.

Use the cmd.exe NT command line interpreter instead.

Jussi Jumppanen
http://www.zeusedit.com - Zeus for Windows IDE




Posted by BradPitt on March 26th, 2007



"JussiJ" <jussij@zeusedit.com> ha scritto nel messaggio
news:1174515633.403491.135780@n59g2000hsh.googlegr oups.com...
thx for the advice




Similar Posts