delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/01/02/03:59:05

Date: Tue, 2 Jan 2001 10:57:27 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: "Peter J. Farley III" <pjfarley AT banet DOT net>
cc: djgpp-workers AT delorie DOT com
Subject: Re: fcntl locking changes #3: Notes
In-Reply-To: <5.0.2.1.0.20010101123551.0337e9b0@pop5.banet.net>
Message-ID: <Pine.SUN.3.91.1010102105709.18307D-100000@is>
MIME-Version: 1.0
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

On Mon, 1 Jan 2001, Peter J. Farley III wrote:

>  >I get the same results as you, but the output has file descriptor 7
>  >rather than 5. (Please note that I did my tests on a copy of
>  >unmodified sources from CVS, with Peter's patches.) I tested in the
>  >same conditions as you, Peter.
> 
> You ran them from inside bash.  I ran under COMMAND.COM to get the *.ok 
> files.  When I run them under bash I get the same results as you, fd = 
> 7.

If this matters (to let people know that the test passed), the test
program should forcibly close all handles above 2, before it embarks
on its main code.

> I think bash has more open file descriptors while running, so I 
> think that explains the difference.

Yes, Bash takes 6 handles by default, IIRC, or at least uses handle 6
for output to the terminal.

Btw, does Bash on Unix marks those handles as close-on-exec?  If so,
perhaps the DJGPP port should do that, too.

- Raw text -


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