Ideas for changes to Unix filesystem

Chip Salzenberg chip at tct.uucp
Fri Feb 8 04:13:59 AEST 1991


According to thorinn at diku.dk (Lars Henrik Mathiesen):
>jeremy at socs.uts.edu.au (Jeremy Fitzhardinge) writes:
>>1 - a flink(char *path, int fd) system call/operation.
>
>If I could think of something to use it for, I'd add it to the kernel
>tonight.

It's a convenient way to create lock files -- if, that is, the kernel
also supports fdcreat(), which creates a plain file with no links.

Also, the obvious companion fdunlink(int fd, char *path) is something
I've always wanted.  It unlinks the given path if and only if it is a
name for fd.  With fdunlink(), the UUCP style of lock files can be
used safely and reliably, since the normal race condition -- "how do I
know that the lock I'm removing is the stale one" -- disappears.
-- 
Chip Salzenberg at Teltronics/TCT     <chip at tct.uucp>, <uunet!pdn!tct!chip>
 "Most of my code is written by myself.  That is why so little gets done."
                 -- Herman "HLLs will never fly" Rubin



More information about the Comp.unix.internals mailing list