www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/09/24/12:32:16

Date: Mon, 24 Sep 2001 19:30:54 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Tim Van Holder <tim DOT van DOT holder AT pandora DOT be>
cc: djgpp-workers AT delorie DOT com
Subject: Re: The Perl/FD issue: update
In-Reply-To: <000d01c14510$51197260$bd7d76d5@pandora.be>
Message-ID: <Pine.SUN.3.91.1010924192747.1793B-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, 24 Sep 2001, Tim Van Holder wrote:

> > Fixing this is a bit tricky.  Hmm...
> 
> Is there any reason for stdaux/stdprn to have FD's 3 and 4
> specifically?

Yes: that's how we inherit them from the shell.  We don't open these 
devices, they are already open when the DJGPP program starts up.

> If not, we could fopen() some dummy file
> (say, "/dev/stdaux", "/dev/stdprn", or whatever) at startup
> and use those FILE objects as stdaux/stdprn.  That way, their
> FD will never clash with another FILE.

Sorry, I don't understand: what you suggest simply creates another FILE 
object, instead of those we already provide.  stdaux and stdprn are 
full-fledged FILE objects, not just file handles, except that they are 
statically allocated, not malloced.

- Raw text -


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