Sender: vheyndri AT rug DOT ac DOT be Message-Id: <35051564.2AB5@rug.ac.be> Date: Tue, 10 Mar 1998 11:26:44 +0100 From: Vik Heyndrickx Mime-Version: 1.0 To: Eli Zaretskii Cc: djgpp-workers AT delorie DOT com, Charles Sandmann Subject: Re: Temporary files considered unsafe References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk Eli Zaretskii wrote: > On Mon, 9 Mar 1998, Vik Heyndrickx wrote: > > Can we get at our TSS somehow? > > I don't know. Charles, can you help here? (The context here is to > generate a unique PID for a program, even when several DOS boxes run on > the same machine at the same time.) I've thought about STR-ing in the djgpp start-up code, but unless I'm mistaking we cannot rely on the fact that our DJGPP program runs at protection level 0, can we? I've consulted my DPMI reference, but that doesn't help either, since DPMI 0.9 only in general concerns about LDT descriptors. > > The value of getpid () somehow is not entirely distinct from the current > > time, so it seems a bad candidate in the first place. > > It is good enough as long as you are on DOS, where only one program runs > at any given time (so PID's of those which don't run don't matter). > Windows breaks this. For once not a BUG in Winblows :-) > > It is NOT incorrect, since it defines only a lower bound. Question is > > what is more appropriate. We could even set TMP_MAX as small as 25 > > without breaking ANSI complianceness. > > I don't like this because 25 is too small. Don't get me wrong! I like it neither, but I liked to emphasize that ANSI only requires us to have a value of 25 and larger, just to be able to make a better assessment whether 800 or so is large enough, since that value is the smallest one we can set without needing to ask ourselves whether the ANSI rules are violated. -- \ Vik /-_-_-_-_-_-_/ \___/ Heyndrickx / \ /-_-_-_-_-_-_/