From: "Tim Van Holder" To: Subject: RE: FD 4 special for DJGPP (and Perl in particular)? Date: Wed, 28 Feb 2001 19:39:43 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal In-Reply-To: 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 Precedence: bulk Actually, it seems it's not just FD 4: a simple loop creating foo.sh with different fd's (2 - 13) yields: trying FD 2 foo trying FD 3 foo trying FD 4 ./foo.sh: redirection error: Bad file descriptor (EBADF) foo trying FD 5 foo trying FD 6 foo trying FD 7 ./foo.sh: redirection error: Bad file descriptor (EBADF) foo trying FD 8 ./foo.sh: redirection error: Bad file descriptor (EBADF) foo trying FD 9 ./foo.sh: redirection error: Bad file descriptor (EBADF) foo trying FD 10 foo trying FD 11 foo trying FD 12 foo trying FD 13 foo So it would seem FD's 4, 7, 8 and 9 are 'reserved' by Perl. Could it be due to some breakage involving handles that are set as noinherit or close-on-exec? Is rebuilding Perl using CVS libc likely to change things?