Mail Archives: djgpp-workers/2001/09/24/12:32:16
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 -