From: Zac Medico Date: Sun, 26 Feb 2006 12:05:36 +0000 (-0000) Subject: Fix 'Bad file descriptor' error with hardlink locking for bug 124140. X-Git-Tag: v2.1_pre6~50 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=fb6d749e4472da7d139ffd5598be0ca4ec6727eb;p=portage.git Fix 'Bad file descriptor' error with hardlink locking for bug 124140. svn path=/main/trunk/; revision=2790 --- 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)