libtool
[Top][All Lists]
Advanced

[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: Albert Chin
Subject: Re: Creating lock file for compilers that don't support -c -o
Date: Tue, 26 Aug 2003 10:38:06 -0500
User-agent: Mutt/1.4i

On Tue, Aug 26, 2003 at 07:13:34AM -0400, Earnie Boyd wrote:
> Paul Jarc wrote:
> >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.
> >
> 
> Problem with symlinks, and hardlinks for that matter, is portability. 
> Not all systems support them.

We only need to worry about it on systems without -c -o support.

-- 
albert chin (address@hidden)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]