Created
May 2, 2013 08:40
-
-
Save markmc/5500967 to your computer and use it in GitHub Desktop.
Patch to python 2.7 subprocess.py to show demonstrate what RHEL6 python 2.6 is doing. See https://bitbucket.org/eventlet/eventlet/pull-request/30/add-dummy-timeout-parameter-to
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- subprocess.py.pristine 2013-05-02 09:32:32.314673712 +0100 | |
+++ subprocess.py 2013-05-02 09:35:50.284568183 +0100 | |
@@ -490,7 +490,7 @@ | |
retcode = call(["ls", "-l"]) | |
""" | |
- return Popen(*popenargs, **kwargs).wait() | |
+ return Popen(*popenargs, **kwargs).wait(timeout=None) | |
def check_call(*popenargs, **kwargs): | |
@@ -748,7 +748,7 @@ | |
elif self.stderr: | |
stderr = _eintr_retry_call(self.stderr.read) | |
self.stderr.close() | |
- self.wait() | |
+ self.wait(timeout=None) | |
return (stdout, stderr) | |
return self._communicate(input) | |
@@ -937,7 +937,7 @@ | |
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: | |
@@ -998,7 +998,7 @@ | |
if stderr: | |
stderr = self._translate_newlines(stderr) | |
- self.wait() | |
+ self.wait(timeout=None) | |
return (stdout, stderr) | |
def send_signal(self, sig): | |
@@ -1283,7 +1283,7 @@ | |
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: | |
@@ -1329,7 +1329,7 @@ | |
if stderr: | |
stderr = self._translate_newlines(stderr) | |
- self.wait() | |
+ self.wait(timeout=None) | |
return (stdout, stderr) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment