Changing the inherited STDOUT



Hi,

My program runs as a child process of a process that its STDOUT was
redirected to a file. (open STDOUT, ">$logfile").
Obviously, the child process inherits the STDOUT redirection. My
question is: if I need to write something to the real output (for
example, the terminal in unix), how can I claim back the original
STDOUT?

Thanks, Yosi

.



Relevant Pages

  • 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: Problem excuteing RPM form java
    ... When your rpm has a pre or postinstallation script there is probably ... you read from stdout until EOF is reached ... so you don't even begin to read from stderr until after ... while you are still reading stdout, so the child process blocks. ...
    (comp.lang.java.help)
  • 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)
  • Re: How does one effect O_NONBLOCK?!
    ... but using the whole available buffer when writing to a file. ... child process in order to make the child process believe it's ... the child's stdout and stderr might appear in the parent interleaved ... that could happen since stderr isn't buffered (even if its ...
    (comp.unix.programmer)