Redirection of stderr

Tony Booker tb at sequent.sequent.com
Sat Mar 16 01:26:48 AEST 1991


In article <1991Mar14.225058.13507 at athena.mit.edu> jik at athena.mit.edu (Jonathan I. Kamens) writes:

     It is possible to replace stderr with a file doing something like this:

       freopen(error_file, "w", stderr);

   However, if you do things this way, I can't see any way to put the
   original stderr back in place -- there is no "fdreopen".  That's
   unfortunate.

I beleive the return value of freopen() is the original file for you
to salt away as necessary.
--

The above drivel is mine.  Company drivel sounds _MUCH_ more plausible ;^)



More information about the Comp.unix.questions mailing list