Date: Tue, 23 Dec 1997 11:18:43 +0200 (IST) From: Eli Zaretskii To: Gavin Sinclair cc: djgpp AT delorie DOT com Subject: Re: gcc output redirection In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Tue, 23 Dec 1997, Gavin Sinclair wrote: > freopen("ERRORS.LST", "w", stderr); > > Be warned, though, that when you do this (you can do it with stdout as > well), you can't get stderr back! Why not? I think the following will restore stderr to its original settings: freopen ("CON", "w", stderr); setvbuf (stderr, 0, _IONBF, 0);