diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-02-04 02:18:29 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-02-04 02:18:29 +0000 |
commit | 7ec5a659252148ad87191108622e9ab7e9712605 (patch) | |
tree | 4dea6ef1ff55aa6673272274c588c02e719a760b /scripts | |
parent | c9b2d80bcda33e3e26c1a2afc7b76e3bc0a8489d (diff) |
* 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.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build-remote.pl.in | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/build-remote.pl.in b/scripts/build-remote.pl.in index 3b67555d4..2afa3af56 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; |