www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/01/12/02:59:46

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f
Date: Sat, 12 Jan 2002 09:56:05 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: tim DOT van DOT holder AT pandora DOT be
Message-Id: <7680-Sat12Jan2002095605+0200-eliz@is.elta.co.il>
X-Mailer: emacs 21.1.50 (via feedmail 8 I) and Blat ver 1.8.9
CC: djgpp-workers AT delorie DOT com
In-reply-to: <000001c19ad8$877eeba0$915f77d5@zastaixp>
(tim DOT van DOT holder AT pandora DOT be)
Subject: Re: frlist.c proposed patch
References: <000001c19ad8$877eeba0$915f77d5 AT zastaixp>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: "Tim Van Holder" <tim DOT van DOT holder AT pandora DOT be>
> Date: Fri, 11 Jan 2002 20:45:30 +0100
> 
> A bigger problem is that several Unix-born programs assume handles 0, 1,
> 2 to be the standard streams (in the best case, they use STDOUT_FILENO
> or similar macros, but it biols down to the same assumption).
> To cater for that, we could just ensure fd's 0-4 are always opened
> (so user-space fd's would be 5 and up), e.g. by opening NUL when one
> of them is closed at startup.  Do we control the FD, or do we just
> have to make do with what DOS gives us?

If those handles are open, we should not change them, of course.  If
they are _not_ open, we could do anything we reasonably want to.

However, I'm not sure we indeed should open those handles, just make
them invalid, so any code that uses them will fail.  Some program
could actually close those handles to gain more handles, for example;
IMHO we shouldn't defeat such code unless we absolutely have to.

- Raw text -


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