From fb6d749e4472da7d139ffd5598be0ca4ec6727eb Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 26 Feb 2006 12:05:36 +0000 Subject: Fix 'Bad file descriptor' error with hardlink locking for bug 124140. svn path=/main/trunk/; revision=2790 --- pym/portage_locks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pym/portage_locks.py') diff --git a/pym/portage_locks.py b/pym/portage_locks.py index f108cba2e..9f4bdaa34 100644 --- a/pym/portage_locks.py +++ b/pym/portage_locks.py @@ -122,7 +122,8 @@ def lockfile(mypath,wantnewlockfile=0,unlinkfile=0): raise - if type(lockfilename) == types.StringType and os.fstat(myfd).st_nlink != 1: + if type(lockfilename) == types.StringType and \ + myfd != HARDLINK_FD and os.fstat(myfd).st_nlink != 1: # The file was deleted on us... Keep trying to make one... os.close(myfd) portage_util.writemsg("lockfile recurse\n",1) -- cgit v1.2.3-1-g7c22