Date: Mon, 24 Sep 2001 19:30:54 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Tim Van Holder cc: djgpp-workers AT delorie DOT com Subject: Re: The Perl/FD issue: update In-Reply-To: <000d01c14510$51197260$bd7d76d5@pandora.be> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 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.