Date: Thu, 26 Feb 1998 13:52:38 +0200 (IST) From: Eli Zaretskii To: Vik Heyndrickx cc: djgpp AT delorie DOT com, robert DOT hoehne AT gmx DOT net Subject: Re: RHIDE eats file descriptors (among other things) In-Reply-To: <34F52F97.2151@rug.ac.be> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Thu, 26 Feb 1998, Vik Heyndrickx wrote: > Lately I discovered that RHIDE seems to reduce the amount of available > DOS files handles to a running program by about 5. If RHIDE has several files open when it runs child programs, that child will inherit all the handles RHIDE has open. By default, all handles are open by the DJGPP's libc with the no-inherit bit cleared. (This matches POSIX behavior, AFAIK.) This is so for all DJGPP programs, I don't think RHIDE does anything special here. > Can this be avoided? Explicitly close the handles you don't need in the program that is run by RHIDE. Alternatively, run the child via COMMAND.COM ("command.com /c foo") because COMMAND.COM closes all handles beyond the first 3 when it starts. Btw, can you explain why does this present a problem? Since DJGPP programs can automagically have up to 254 handles (provided you set FILES= appropriately), is this really something which is worth the hassle?