Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!sdd.hp.com!elroy.jpl.nasa.gov!ames!vsi1!daver!tscs!tct!chip From: chip@tct.uucp (Chip Salzenberg) Newsgroups: comp.unix.internals Subject: Re: Ideas for changes to Unix filesystem Message-ID: <27B18AD8.2F15@tct.uucp> Date: 7 Feb 91 17:13:59 GMT References: <1991Jan30.143326.16676@socs.uts.edu.au> <1991Feb5.223232.21632@odin.diku.dk> Organization: Teltronics/TCT, Sarasota, FL Lines: 19 According to thorinn@diku.dk (Lars Henrik Mathiesen): >jeremy@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 , "Most of my code is written by myself. That is why so little gets done." -- Herman "HLLs will never fly" Rubin