mirror of
https://github.com/python/cpython.git
synced 2025-08-16 06:40:56 +00:00
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. ........
This commit is contained in:
parent
dacb8043ff
commit
312efbc115
4 changed files with 34 additions and 2 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue