Subject: Re: utmp file format change
To: Andrew Brown <atatat@atatdot.net>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-userlevel
Date: 09/25/2001 18:26:50
On Tue, 25 Sep 2001, Andrew Brown wrote:

> >True, but since you have to give open a path, you can follow it with a
> >call to unlink().
>
> but i still have to worry about racing someone to opening a file with
> a random name that i only want for a short time.  i was thinking of
> something like tmpfile(), but different in that (a) it returned a file
> descriptor and not a FILE*, and (b) the name never gets created so
> there's no need to follow it immediately by a call to unlink().

fileno will get around (a). There is no way with our current file systems
to get around (b), though tmpfile() does it for you.

Take care,

Bill