Capture stdout and stderr from child process

From: Peter Tan (shiuyuan_at_yahoo.com)
Date: 08/29/03


Date: 29 Aug 2003 12:06:12 -0700

Hello,

   I am trying to capture standard output and error from unix shell
running as a child process. I understand that to do so, I need to use
pseudo terminal. But the problem is the slave side combine stdout and
stderr nad print them out together on the terminal. My question is if
there is a way to separate stderr and stdout?

Thanks You,
Peter



Relevant Pages

  • Re: Capture stdout and stderr from child process
    ... > I am trying to capture standard output and error from unix shell ... >running as a child process. ... >stderr nad print them out together on the terminal. ... >there is a way to separate stderr and stdout? ...
    (comp.unix.programmer)
  • Re: does IO.read block?
    ... Assume an application as a child process that frequently writes to stdout and stderr. ... The parent process at the other end of those two pipes only reads the stdout pipe. ...
    (comp.lang.ruby)
  • Re: [ANN] open4-0.8.0
    ... $ sudo gem install open4 ... open child process with handles on pid, stdin, stdout, and stderr: ...
    (comp.lang.ruby)
  • [ANN] open4-0.8.0
    ... open child process with handles on pid, stdin, stdout, and stderr: ... include Open4 ...
    (comp.lang.ruby)
  • Re: How does one effect O_NONBLOCK?!
    ... would get the child process to react exactly the same way as ... it would if its stdout would be connected to a terminal (that's ... changed the default buffering mode). ... I'm sure I won't need pseudo-terminals for pkg- ...
    (comp.unix.programmer)