[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Creating lock file for compilers that don't support -c -o
From: |
Paul Jarc |
Subject: |
Re: Creating lock file for compilers that don't support -c -o |
Date: |
Mon, 25 Aug 2003 16:45:52 -0400 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux) |
Bob Friesenhahn <address@hidden> wrote:
> Creating a symbolic link requires testing for an existing file, and
> then (if the file does not exist) creating a new file, and a
> directory entry to reference it. This requires multiple network
> transactions with an opportunity for race-conditions.
open() with O_CREAT|O_EXCL also creates a new file, yet that does not
subject it to race conditions. symlink() has equivalent semantics to
O_CREAT|O_EXCL. It may be that some network filesystems fail to
preserve the atomicity; I wouldn't know. But at least for local
filesystems, I don't see any problems with symlinks.
paul
Re: Creating lock file for compilers that don't support -c -o, Robert Collins, 2003/08/25
Re: Creating lock file for compilers that don't support -c -o, Albert Chin, 2003/08/25