From ad142eb0b7ef93c0918c33bcc5897142207e509c Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Thu, 31 Jul 2003 16:34:58 +0000 Subject: fixed shlock_urpmi_db to be shared and not waiting. --- urpm.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/urpm.pm b/urpm.pm index 636a1d06..17fa8fc7 100644 --- a/urpm.pm +++ b/urpm.pm @@ -2482,11 +2482,11 @@ sub shlock_urpmi_db { my ($urpm) = @_; #- avoid putting a require on Fcntl ':flock' (which is perl and not perl-base). - my $LOCK_EX = 2; + my ($LOCK_SH, $LOCK_NB) = (1, 4); #- lock urpmi database, but keep lock to wait for an urpmi.update to finish. open LOCK_FILE, ">$urpm->{statedir}/.LOCK"; - flock LOCK_FILE, $LOCK_EX or $urpm->{fatal}(7, N("urpmi database locked")); + flock LOCK_FILE, $LOCK_SH|$LOCK_NB or $urpm->{fatal}(7, N("urpmi database locked")); } sub unlock_urpmi_db { my ($_urpm) = @_; -- cgit v1.2.1