Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!rice!uw-beaver!milton!ogicse!intelhf!agora!parsely!percy!tektronix!sequent!tb From: tb@sequent.sequent.com (Tony Booker) Newsgroups: comp.unix.questions Subject: Re: Redirection of stderr Message-ID: Date: 15 Mar 91 15:26:48 GMT References: <574@dprmpt.UUCP> <1991Mar14.220650.11736@athena.mit.edu> <1991Mar14.225058.13507@athena.mit.edu> Sender: tb@sequent.UUCP Distribution: na Organization: /sequent/q/tb/.organization Lines: 15 In-reply-to: jik@athena.mit.edu's message of 14 Mar 91 22:50:58 GMT In article <1991Mar14.225058.13507@athena.mit.edu> jik@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 ;^)