summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--urpm/lock.pm5
1 files changed, 1 insertions, 4 deletions
diff --git a/urpm/lock.pm b/urpm/lock.pm
index bcc02627..28967137 100644
--- a/urpm/lock.pm
+++ b/urpm/lock.pm
@@ -56,10 +56,7 @@ sub get_lock_pid {
my $major = int($dev/256);
my $minor = $dev % 256;
my $fileid = sprintf("%02x:%02x:%d",$major,$minor,$ino);
- open(LOCKS, "/proc/locks") || return;
- my @locks = <LOCKS>;
- close(LOCKS);
- foreach (@locks) { /FLOCK.*WRITE\s*(\d+)\s*$fileid\s/ && return $1 }
+ foreach (urpm::util::cat_('/proc/locks')) { /FLOCK.*WRITE\s*(\d+)\s*$fileid\s/ && return $1 }
}
sub _lock {