On Fri, 2 Jul 2010 08:08:59 -0500, McKown, John wrote:
>
During this time (file open, but link count is zero), it is possible to create 
a new link (directory entry name) for the file and thus "restore" it.
>
What's the name of the interface for this.

I notice that on most UNIX systems, tmpfile() unlinks the temporary
file immediately:

TMPFILE(3)               BSD Library Functions Manual               TMPFILE(3)
...
DESCRIPTION
     The tmpfile() function returns a pointer to a stream associated with a file
     descriptor returned by the routine mkstemp(3).  The created file is 
unlinked
     before tmpfile() returns, causing the file to be automatically deleted 
when the
     last reference to it is closed.

so that if the owning process is cancelled except during a tiny
timing window, the file is deleted.  z/OS, however, doesn't unlink
it until it's closed, so killing the owning process may leave junk
around.  (Very old empirical information.)  POSIX doesn't require
the nicer BSD behavior.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to