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: Mon, 25 Aug 2003 21:58:37 -0500
User-agent: Mutt/1.4i

On Mon, Aug 25, 2003 at 12:58:07PM -0500, Bob Friesenhahn wrote:
> On Mon, 25 Aug 2003, Albert Chin wrote:
> 
> > If a compiler doesn't support -c -o, libtool creates a lock file by
> > hard linking the libtool binary with the lock file. This is a problem
> > if the libtool binary is on a different file system than the lock
> > file. Why don't we use a symbolic link?
> 
> Creating a hard link is an atomic operation whereas a symbolic link is
> not so it can't be used as a locking mechanism.
> 
> Maybe there is some other hard-link which can be used instead?

Why not use $srcfile and "$srcfile.lock" as the lock file? So, rather
than:
      until $run ln "$0" "$lockfile" 2>/dev/null; do
we would have:
      lockfile="$srcfile.lock"
      ...
      until $run ln "$srcfile" "$lockfile" 2>/dev/null; do

-- 
albert chin (address@hidden)




reply via email to

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