Re: Race condition in vim_tempname() on Windows

2009-02-20 Fir de Conversatie Tony Mechelynck
On 20/02/09 05:45, Bram Moolenaar wrote: Matt Wozniski wrote: src/fileio.c : vim_tempname() contains these lines: if (GetTempFileName(szTempFile, buf4, 0, itmp) == 0) return NULL; /* GetTempFileName() will create the file, we don't want that */ (void)DeleteFile(itmp);

Re: Race condition in vim_tempname() on Windows

2009-02-20 Fir de Conversatie Nikolai Weibull
On Fri, Feb 20, 2009 at 10:16, Tony Mechelynck antoine.mechely...@gmail.com wrote: On 20/02/09 05:45, Bram Moolenaar wrote: Changing this behavior will not be easy, so you will have to come up with some kind of proof that the current mechanism may fail. Also, what about the case when a

Re: Race condition in vim_tempname() on Windows

2009-02-20 Fir de Conversatie Bram Moolenaar
Nikolai Weibull wrote: On Fri, Feb 20, 2009 at 10:16, Tony Mechelynck antoine.mechely...@gmail.com wrote: On 20/02/09 05:45, Bram Moolenaar wrote: Changing this behavior will not be easy, so you will have to come up with some kind of proof that the current mechanism may fail.

Re: Race condition in vim_tempname() on Windows

2009-02-19 Fir de Conversatie Bram Moolenaar
Matt Wozniski wrote: src/fileio.c : vim_tempname() contains these lines: if (GetTempFileName(szTempFile, buf4, 0, itmp) == 0) return NULL; /* GetTempFileName() will create the file, we don't want that */ (void)DeleteFile(itmp); Is this really right? Is there any

Race condition in vim_tempname() on Windows

2009-02-17 Fir de Conversatie Matt Wozniski
src/fileio.c : vim_tempname() contains these lines: if (GetTempFileName(szTempFile, buf4, 0, itmp) == 0) return NULL; /* GetTempFileName() will create the file, we don't want that */ (void)DeleteFile(itmp); Is this really right? Is there any reason to call DeleteFile()