Date: Thu, 16 Aug 2001 00:23:20 +0300 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: "Tim Van Holder" Message-Id: <1225-Thu16Aug2001002319+0300-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9 CC: djgpp-workers AT delorie DOT com In-reply-to: Subject: Re: Very strange behaviour in our Perl port (redirection issue?) References: 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 > From: "Tim Van Holder" > Date: Wed, 15 Aug 2001 19:50:24 +0200 > > I ran m4 under gdb under Perl. The fopen() succeeds and gives FD 4. Handle 4? That's preconnected to the printer, at least initially. Does Perl or m4 close it at startup? If not, I can't understand how did m4 get handle 4 from fopen. > How can Perl mess up FD's that are available to the child program? Maybe Perl assumes that the handles are by default not inherited, or calls the appropriate FCNTL function to make them not inherited. We don't support that, unless you build with the CVS library, where Mark added that feature. So in stock v2.03, all handles are inherited by the child program, and thus point to the same files/devices that they are inside Perl.