From: Zac Medico Date: Sat, 18 Sep 2010 11:12:34 +0000 (-0700) Subject: Fix lockfile() to close the file descriptor before raising TryAgain. X-Git-Tag: v2.2_rc84~8 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=056bcf353615186e755122b6bf2f0ffe98a9c6c7;p=portage.git Fix lockfile() to close the file descriptor before raising TryAgain. --- diff --git a/pym/portage/locks.py b/pym/portage/locks.py index 00a50b818..1f8f58013 100644 --- a/pym/portage/locks.py +++ b/pym/portage/locks.py @@ -118,6 +118,7 @@ def lockfile(mypath, wantnewlockfile=0, unlinkfile=0, if e.errno in (errno.EACCES, errno.EAGAIN): # resource temp unavailable; eg, someone beat us to the lock. if flags & os.O_NONBLOCK: + os.close(myfd) raise TryAgain(mypath) global _quiet