Hi, On Mon 08 Feb 2010 16:34, Ken Raeburn <raeb...@raeburn.org> writes:
> On Feb 8, 2010, at 06:11, Andy Wingo wrote: > >> 3. Is tmpfile(3) really needed, if you have mkstemp! and dynamic >> extents? Here's what I use, for example: > > But mkstemp doesn't guarantee that no one else will grab the file name > in between the time mkstemp checks that the file doesn't exist, and when > you actually open(O_CREAT) it. It does. The return value from mkstemp! is a port, and it mutates the template to give you a file name. See mkstemp(3). Andy -- http://wingolog.org/