Date: Wed, 4 Jun 1997 09:49:13 +0300 (IDT) From: Eli Zaretskii To: Bill Currie cc: djgpp-workers AT delorie DOT com, Daisuke Aoyama Subject: Re: Passing file handles to child programs In-Reply-To: <33959EF2.5D10@blackmagic.tait.co.nz> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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.