From 056bcf353615186e755122b6bf2f0ffe98a9c6c7 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 18 Sep 2010 04:12:34 -0700 Subject: Fix lockfile() to close the file descriptor before raising TryAgain. --- pym/portage/locks.py | 1 + 1 file changed, 1 insertion(+) 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 -- cgit v1.2.3-1-g7c22