Commit d5274f84 authored by Denis Bilenko's avatar Denis Bilenko

subprocess: add timeout argument to wait() function (currently only on posix, not on windows)

parent de613d10
......@@ -735,11 +735,11 @@ class Popen(object):
"""
return self.returncode
def wait(self):
def wait(self, timeout=None):
"""Wait for child process to terminate. Returns returncode
attribute."""
if self.returncode is None:
self._event.wait()
self._event.wait(timeout=timeout)
return self.returncode
def send_signal(self, sig):
......
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