From: Zac Medico Date: Wed, 9 Jul 2008 12:03:53 +0000 (-0000) Subject: Fix SubProcess._poll to handle a missing pid gracefully. X-Git-Tag: v2.2_rc2~144 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=616c0ca17eb928b0e7683aa0b689806d54b88d97;p=portage.git Fix SubProcess._poll to handle a missing pid gracefully. svn path=/main/trunk/; revision=10998 --- diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 1c652e691..a696e5c2b 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -1703,6 +1703,8 @@ class SubProcess(AsynchronousTask): def _poll(self): if self.returncode is not None: return self.returncode + if self.pid is None: + return self.returncode retval = os.waitpid(self.pid, os.WNOHANG) if retval == (0, 0): return None