delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/09/11/13:16:03

From: "Tim Van Holder" <tim DOT van DOT holder AT pandora DOT be>
To: <djgpp-workers AT delorie DOT com>
Cc: <perl5-porters AT perl DOT org>
Subject: Re: Win2k + djgpp
Date: Tue, 11 Sep 2001 19:14:33 +0200
Message-ID: <000001c13ae5$3a1d3900$6e7c76d5@pandora.be>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook, Build 10.0.2627
Importance: Normal
In-Reply-To: <Pine.SUN.3.91.1010911094337.2127C-100000@is>
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
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 11 Sep 2001, Tim Van Holder wrote:
> > Well, if you recall there was an issue where a perl-spawned shell
> > script (for example, autoconf when called from autoupdate) could
> > do
> >   exec 4>config.log
> > but any redirection to FD 4 would cause EBADF.
> 
> Yes, but I cannot figure out what does this have to do with the test 
> program you posted.  To reproduce this failure, a test program should 
> have called open/dup/dup2 in a typical redirection paradigm, 
> preferably similar to the code that is actually executed by Bash when
> it sees a command such as the one above.  Your test program didn't do 
> that, it just opened files.
I know; I merely wanted to show that closing those in Perl made them
available as regular FDs to spawned programs, and that the failures I
saw before tended to concern those FDs.
I just rebuilt perl 5.7.2 with the closing of stdaux and stdprn
disabled (and with CVS libc like before), and now autom4te is working
happily.  So I'd recommend having perl.c use

  #if defined(MSDOS) || !defined(__DJGPP__)

around those two lines.
I have no clue as to _why_ this has any effect; all I know is that when
Perl closes stdaux and stdprn, spawned programs get screwed up.  I'm
currently too busy to do further investigation.

Laszlo, how stable is 5.7.2?  It might be useful to make a release
for DJGPP with that change; then I can release newer autoconfs with
a DSM 'requires' for that version of perl (releasing a patched build
of 5.6.1 would be fine too, provided the DSM lists it as 5.6.1b or
something).

- Raw text -


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