Subject: Re: utmp file format change
To: Andrew Brown <atatat@atatdot.net>
From: R. C. Dowdeswell <elric@mabelode.imrryr.org>
List: tech-userlevel
Date: 09/28/2001 18:48:58
On 710321009 seconds since the Beginning of the UNIX epoch
Andrew Brown wrote:
>
>>> right.  i was thinking of smoething a little more silly like
>>> 
>>> 	int f = open(NULL, O_RDWR|O_CREAT|O_UNLINK, 0);
>>> 
>>> which would give me back something that had a link count of zero.
>>
>>On what medium would it store its data?
>
>off=hand, i'd say that NULL would imply whatever "." was, or you could
>pass a path in, from which the kernel would intuit a specific file
>system.
>
>the point is that the file, while backed by disk space somewhere, does
>not really exist, and gets deallocated when the file descriptor is
>closed.  it's sort of like kernel support for tmpfile, but safer.

I'd suggest that if this is implemented, one would consider it a
logical analogue to mmap(2)ing anonymous pages, i.e. it would be
simply swap backed.  Of course in order to make it properly useful
one would want to have an flink(2) syscall, so that one could put
it somewhere.  ;-)

 == Roland Dowdeswell                      http://www.Imrryr.ORG/~elric/  ==
 == The Unofficial NetBSD Web Pages        http://www.Imrryr.ORG/NetBSD/  ==
 == The NetBSD Project                            http://www.NetBSD.ORG/  ==
 == Ponte, Inc.                                    http://www.ponte.com/  ==