aboutsummaryrefslogtreecommitdiff
path: root/src/util/git-lock.pl
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/git-lock.pl')
-rwxr-xr-xsrc/util/git-lock.pl2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util/git-lock.pl b/src/util/git-lock.pl
index 9980833..7fdbed5 100755
--- a/src/util/git-lock.pl
+++ b/src/util/git-lock.pl
@@ -6,6 +6,7 @@
use strict;
use Cwd;
+use POSIX;
#use Fcntl ':flock';
use sigtrap qw(die normal-signals);
@@ -32,6 +33,7 @@ my $lockdir = "$git_dir/GITLOCK";
my $waittime = 0.01;
my $maxwaittime = 10;
while (! (mkdir $lockdir)) {
+ die if $! != EEXIST;
# Wait some time
my $unit = $waittime==1 ? "second" : "seconds";
print "Git repository is busy; waiting $waittime $unit...\n";