[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gettext-0.14.2 fails on parallel build

From: Alexandre Duret-Lutz
Subject: Re: gettext-0.14.2 fails on parallel build
Date: Tue, 22 Mar 2005 09:50:18 +0100
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux)

>>> "Bruno" == Bruno Haible <address@hidden> writes:
 Bruno> $(am__ELCFILES): elc-stamp
 Bruno> ## Recover from the removal of address@hidden
 Bruno> ##
 Bruno> ! ## Do not call `make elc-stamp' if emacs is not available, because it 
 Bruno> ! ## be useless.
 Bruno> @if test "$(EMACS)" != no && test ! -f $@; then \
 Bruno> ! ## Mutual exclusion locking to ensure that if multiple processes need 
 Bruno> ! ## rebuild elc-stamp, only the first one does it, and the followers 
 Bruno> !         trap 'rm -rf elc-lock elc-stamp' 1 2 3 15; \
 Bruno> !         if mkdir elc-lock 2>/dev/null; then \
 Bruno> ! ## This code is being executed by the first process.
 Bruno> !           rm -f elc-stamp; \
 Bruno> !           $(MAKE) $(AM_MAKEFLAGS) elc-stamp; \
 Bruno> !           rmdir elc-lock; \
 Bruno> !         else \
 Bruno> ! ## This code is being executed by the follower processes.
 Bruno> ! ## Wait until the first process is done.
 Bruno> !           while test -d elc-lock; do sleep 1; done; \
 Bruno> ! ## Succeed if and only if the first process succeeded.
 Bruno> !           test -f elc-stamp; exit $$?; \
 Bruno> !         fi; \
 Bruno> else : ; fi
This code still has a race if one of the followers gets signaled
after its trap has been set.  Then it will erase elc-lock, and
another follower can create it.

Any idea?
Alexandre Duret-Lutz

reply via email to

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