Created
July 29, 2010 04:29
-
-
Save jleedev/497243 to your computer and use it in GitHub Desktop.
Screwing with subprocess
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
from signal import * | |
from subprocess import * | |
Popen(['true']).communicate() | |
signal(SIGCHLD, SIG_IGN) | |
Popen(['true']).communicate() |
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
Traceback (most recent call last): | |
File "test.py", line 8, in <module> | |
Popen(['true']).communicate() | |
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 668, in communicate | |
self.wait() | |
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1137, in wait | |
pid, sts = os.waitpid(self.pid, 0) | |
OSError: [Errno 10] No child processes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment