www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1997/06/04/02:55:01

Date: Wed, 4 Jun 1997 09:49:13 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Bill Currie <billc AT blackmagic DOT tait DOT co DOT nz>
cc: djgpp-workers AT delorie DOT com, Daisuke Aoyama <jack AT st DOT rim DOT or DOT jp>
Subject: Re: Passing file handles to child programs
In-Reply-To: <33959EF2.5D10@blackmagic.tait.co.nz>
Message-ID: <Pine.SUN.3.91.970604094757.2271F-100000@is>
MIME-Version: 1.0

On Wed, 4 Jun 1997, Bill Currie wrote:

> This would probably be a good solution so long as any files that NEED to
> be inherited can. (a flag to open?)

Yes, I've thought about this.  But I'm afraid that if the flag will by 
default be NO_INHERIT, this will introduce subtle bugs in existing 
programs which silently assume that handles are inherited, and that's 
where I was asking for comments.  This is the same situation as with
the `_fmode' variable: most programs need it to be O_BINARY, but we
still default it to O_TEXT for fear of subtle bugs.

In general, any Unix-born program that uses the fork/exec paradigm,
gets the same handles in the child as in the parent.  I have never
seen them use more than the first 3 standard handles, but I'm not sure
I can safely rely on this.

- Raw text -


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