delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/08/06:13:15

Date: Wed, 8 May 1996 13:06:30 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Charles Sandmann <sandmann AT clio DOT rice DOT edu>
Cc: djgpp AT delorie DOT com
Subject: Re: gdb and stdout
In-Reply-To: <318f797a.sandmann@clio.rice.edu>
Message-Id: <Pine.SUN.3.91.960508125905.17904A-100000@is>
Mime-Version: 1.0

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019