diff options
author | Gregory P. Smith <greg@mad-scientist.com> | 2010-12-14 15:02:53 +0000 |
---|---|---|
committer | Gregory P. Smith <greg@mad-scientist.com> | 2010-12-14 15:02:53 +0000 |
commit | 6402238555f323d901008e7e8606b0120e9a8c02 (patch) | |
tree | d7655a54c53d37237b1ea1f2fb18637cfb25319d /Lib/test/test_subprocess.py | |
parent | 5ac4102f95695563971eb61066caf37e37684744 (diff) | |
download | cpython-6402238555f323d901008e7e8606b0120e9a8c02.tar.gz |
Merged revisions 87233 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r87233 | gregory.p.smith | 2010-12-14 06:38:00 -0800 (Tue, 14 Dec 2010) | 4 lines
Issue #1731717: Fixed the problem where subprocess.wait() could cause an
OSError exception when The OS had been told to ignore SIGCLD in our process
or otherwise not wait for exiting child processes.
........
Diffstat (limited to 'Lib/test/test_subprocess.py')
-rw-r--r-- | Lib/test/test_subprocess.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index 37c4e0fc77..26adf225d5 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -778,6 +778,16 @@ class POSIXProcessTestCase(BaseTestCase): self.assertStderrEqual(stderr, '') self.assertEqual(p.wait(), -signal.SIGTERM) + def test_wait_when_sigchild_ignored(self): + # NOTE: sigchild_ignore.py may not be an effective test on all OSes. + sigchild_ignore = test_support.findfile("sigchild_ignore.py", + subdir="subprocessdata") + p = subprocess.Popen([sys.executable, sigchild_ignore], + stdout=subprocess.PIPE, stderr=subprocess.PIPE) + stdout, stderr = p.communicate() + self.assertEqual(0, p.returncode, "sigchild_ignore.py exited" + " non-zero with this error:\n%s" % stderr) + @unittest.skipUnless(mswindows, "Windows specific tests") class Win32ProcessTestCase(BaseTestCase): |