0

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.

corbin
  • 1,446
  • 2
  • 27
  • 40
  • Which of those three have you gotten to work, and which are you having trouble with? – Beta Jul 08 '13 at 18:28
  • 1
    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. – Barmar Jul 08 '13 at 18:28
  • @Bamar I keep learning the same two things: 1) I make things more complicated than they need to be. 2) People on SO are very helpful. Thanks! – corbin Jul 08 '13 at 18:46
  • @Bamar, if you want to make that into an answer, I will accept it. – corbin Jul 08 '13 at 18:53
  • @Barmar if you want to make that into an answer, I will accept it. (sorry for the typo in your name/handle before) – corbin Jul 10 '13 at 16:48

1 Answers1

2

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.

Barmar
  • 741,623
  • 53
  • 500
  • 612