[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: mkstemp
- From: "Alex Queiroz" <asandroq@...>
- Date: Sat, 15 Apr 2006 17:08:21 -0300
Hallo,
On 4/15/06, Reuben Thomas <rrt@sc3d.org> wrote:
>
> Besides, mkstemp is something one is unlikely ever to implement (or even
> worse, use) correctly, at least on a multi-tasking system. Creating
> temporary files is a hard problem, as witness the number of different
> functions for doing so on a typical POSIX-based system. Creating a
> temporary filename without a file is simply not possible on such
> systems: you always have a race condition.
>
But Lua closes the file anyway, just before returning the name.
Using mkstemp will not avoid a race condition in this case.
--
-alex
http://www.ventonegro.org/