Author: Armin Rigo <ar...@tunes.org>
Branch: 
Changeset: r64710:51f304544a4b
Date: 2013-06-02 12:15 +0200
http://bitbucket.org/pypy/pypy/changeset/51f304544a4b/

Log:    issue #1507: silence "not holding the import lock" after a fork().

diff --git a/pypy/module/imp/importing.py b/pypy/module/imp/importing.py
--- a/pypy/module/imp/importing.py
+++ b/pypy/module/imp/importing.py
@@ -791,6 +791,10 @@
     def release_lock(self):
         me = self.space.getexecutioncontext()   # used as thread ident
         if self.lockowner is not me:
+            if self.lockowner is None:
+                # Too bad.  This situation can occur if a fork() occurred
+                # with the import lock held, and we're the child.
+                return
             if not self._can_have_lock():
                 return
             space = self.space
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to