From 7ec5a659252148ad87191108622e9ab7e9712605 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 4 Feb 2010 02:18:29 +0000 Subject: * Doh! The scope of $slotLock should extend to the end of the script, because otherwise the lock will be released at the end of the while loop. --- scripts/build-remote.pl.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/build-remote.pl.in b/scripts/build-remote.pl.in index 3b67555d4b56..2afa3af562a4 100755 --- a/scripts/build-remote.pl.in +++ b/scripts/build-remote.pl.in @@ -94,6 +94,7 @@ sub openSlotLock { my $hostName; +my $slotLock; while (1) { @@ -164,7 +165,7 @@ while (1) { my $selected = $available[0]; my $machine = $selected->{machine}; - my $slotLock = openSlotLock($machine, $selected->{free}); + $slotLock = openSlotLock($machine, $selected->{free}); flock($slotLock, LOCK_EX | LOCK_NB) or die; utime undef, undef, $slotLock; -- cgit 1.4.1