Mail Archives: djgpp/1996/05/08/06:13:15
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.
- Raw text -