문제

My goal is to:

Pipe stdin to stdin of child process.

Pipe stdout of child process to stdout.

Pipe stderr of chile process to stderr.

I have looked at these:

http://www.jukie.net/bart/blog/popenRWE

and

http://jineshkj.wordpress.com/2006/12/22/how-to-capture-stdin-stdout-and-stderr-of-child-program/

but am having trouble doing what I listed.

도움이 되었습니까?

해결책

If you want to connect the child process's stdin/stdout/stderr to your stdin/stdout/stderr you don't have to do anything, it inherits them automatically.

Note that this doesn't give your application any access to the data -- it just goes directly between the child process application and the original streams. So it's not really "wrapping" anything.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top