Date: Wed, 8 May 1996 13:06:30 +0200 (IST) From: Eli Zaretskii To: Charles Sandmann Cc: djgpp AT delorie DOT com Subject: Re: gdb and stdout In-Reply-To: <318f797a.sandmann@clio.rice.edu> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Tue, 7 May 1996, Charles Sandmann wrote: > What I did for edebug/fsdb was to change the debugger stdout handle to > something different (via a dup?) before starting the child. It's been > too long now to remember what I did, but this might be a workaround. I'll look into fsdb, but up front I don't see how that's possible, at least as far as only `dup'/`dup2' are used. AFAIK, from DOS point of view, handles returned by `dup' point to the same device/file as the original handle, that is, they both reference the same entry in the SFT (the System File Table). Therefore, you can't redirect one of them without redirecting the other; you must call `open' or `fopen'/`freopen' after `dup' to do that.