Bill Allombert on Fri, 19 Oct 2012 11:11:22 +0200

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: temporary files under win32

On Fri, Oct 19, 2012 at 10:49:28AM +0200, Loïc Grenié wrote:
> 2012/10/19 Bill Allombert <>:
> > The second is that there is a race condition of some sort.
> > If you create 4 directories, each with a copy of gp.exe and start each
> > of them in parallel, MPQS is much more reliable, so this suggest some race
> > condition.
>     Indeed, get_files *is* racy. I'll try to implement getpid() and some
>   sort of getuid() (maybe constant, maybe not). I've no native win32
>   compilers, so my tests will not be perfect.

Are you sure pari_unique_dir() is racy ?

Maybe we should fix get_file not to be racy.
We should remove fix pari_unique_dir/pari_unique_filename.
pari_unique_filename is only used to implement pip on DOS EMX which will not
be missed.

pari_unique_dir could be replaced by pari_create_unique_dir() which create the
directory (I think it is already the case though).