Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top