Kaydet (Commit) 3800ef7a authored tarafından Guido van Rossum's avatar Guido van Rossum

When a previous call to poll() has already seen the process status,

wait() should not call waitpid() again.

Should be backported to 2.2.4.
üst bf68c78a
...@@ -83,6 +83,7 @@ class Popen3: ...@@ -83,6 +83,7 @@ class Popen3:
def wait(self): def wait(self):
"""Wait for and return the exit status of the child process.""" """Wait for and return the exit status of the child process."""
if self.sts < 0:
pid, sts = os.waitpid(self.pid, 0) pid, sts = os.waitpid(self.pid, 0)
if pid == self.pid: if pid == self.pid:
self.sts = sts self.sts = sts
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment