delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/03/09/06:19:08

Date: Mon, 9 Mar 1998 13:17:58 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Vik Heyndrickx <Vik DOT Heyndrickx AT rug DOT ac DOT be>
cc: djgpp-workers AT delorie DOT com
Subject: Re: Temporary files considered unsafe
In-Reply-To: <3503C317.3A36@rug.ac.be>
Message-ID: <Pine.SUN.3.91.980309130555.23398A-100000@is>
MIME-Version: 1.0

On Mon, 9 Mar 1998, Vik Heyndrickx wrote:

> In which sharing mode would such a file be opened by default?

The default DOS sharing is compatibility, AFAIK.

> The most
> sensible mode precisely seems DENY_ALL, but I'll need to test that.

``Sensible''?  Since when do we trust Microsoft to do sensible things?

If you do test this, please tell me, as my references don't say anything 
about this.

> The
> importance for being able to open a file in a particular sharing mode
> seems low.

It's another safeguard, that's all.

> > and the place where DOS puts it (we want it to go to $TMPDIR, for
> > example).
> 
> IIRC this can be controlled through the DOS call.

Which one is that?

> > Won't all first-level programs in different DOS boxes on Windows have the
> > same PSP address?
> 
> I though the DOS conventional memory was common to all DOS boxes, or am
> I so wrong?

It is not common, it is mapped into all DOS boxes, but it is kept 
separate.  Windows twiddles the memory page directory when it multi-tasks 
DOS apps, so that each DOS app gets a separate address space, but the 
real-mode addresses are the same.

> If you are right, what about getpid()?

DJGPP's `getpid' doesn't use the PSP address.  It reads the BIOS clock
tick count the first time it is invoked in the given program, then caches
the value and returns it hence. 

> > AFAIK, this is the max number of unique names we can *potentially*
> > generate.
> 
> Meaning, in the example above 86400 * X ?

What's X?  Is it the total number of segments below 1MB mark?  And how do 
you account for the truncation to 8+3 namespace?

- Raw text -


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