Atomic Create

From: Mark C. Tucker <mct_at_philabs.philips.com>
Date: Mon, 15 May 95 16:42:00 EDT

The UNIX system call
        link(name1,name2)
returns EEXIST if name2 exists.

You can use this for atomic creates by creating
the temp file, then renaming it with link to the desired
name. If you're the second guy to create it, you get EEXIST.

-----------------------------------------------------------------------
Mark Tucker email: mct_at_philabs.philips.com
Philips Laboratories, tel: (914) 945-6564
345 Scarborough Road,Briarcliff Manor,NY 10510 fax: (914) 945-6552
Received on Mon May 15 1995 - 22:43:34 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST