summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:53:13 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:53:13 +0000
commitd89df07a5915bbee7d7a57983a83dfb284c0895c (patch)
tree916c67d381248b1ade359e813bbe4f4ac45439dd /apt-pkg/contrib
parent5b8c90bf2216cc819f3eb99387d88d4a712059d9 (diff)
Made NFS locking bail out
Author: jgg Date: 1999-03-20 03:49:31 GMT Made NFS locking bail out
Diffstat (limited to 'apt-pkg/contrib')
-rw-r--r--apt-pkg/contrib/fileutl.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc
index 0839cc963..67f65b411 100644
--- a/apt-pkg/contrib/fileutl.cc
+++ b/apt-pkg/contrib/fileutl.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: fileutl.cc,v 1.24 1999/03/17 03:25:25 jgg Exp $
+// $Id: fileutl.cc,v 1.25 1999/03/20 03:49:31 jgg Exp $
/* ######################################################################
File Utilities
@@ -83,6 +83,11 @@ int GetLock(string File,bool Errors)
fl.l_len = 0;
if (fcntl(FD,F_SETLK,&fl) == -1)
{
+ if (errno == ENOLCK)
+ {
+ _error->Warning("Not using locking for nfs mounted lock file %s",File.c_sr());
+ return true;
+ }
if (Errors == true)
_error->Errno("open","Could not get lock %s",File.c_str());
close(FD);