summaryrefslogtreecommitdiff
path: root/Lib/test/test_subprocess.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2013-08-02 00:08:51 +0200
committerAntoine Pitrou <solipsis@pitrou.net>2013-08-02 00:08:51 +0200
commit153aaa269ceef77ceea26a1629ee9c3f550d7514 (patch)
treeb24618cfc601cd2991d8a78e9f2b3fcea11a559e /Lib/test/test_subprocess.py
parent1406c9e41bf56b4ec28c417b2f79abf5c26c77b9 (diff)
downloadcpython-153aaa269ceef77ceea26a1629ee9c3f550d7514.tar.gz
Fix the RLIMIT_CORE resource lowering logic in test_subprocess.
We must only lower the soft limit, since lowering the hard limit makes it impossible to raise it back at the end. (this could prevent core dumps from being generated when the test suite crashes)
Diffstat (limited to 'Lib/test/test_subprocess.py')
-rw-r--r--Lib/test/test_subprocess.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index 7899aebe06..3bbb19c573 100644
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -1123,7 +1123,7 @@ class _SuppressCoreFiles(object):
if resource is not None:
try:
self.old_limit = resource.getrlimit(resource.RLIMIT_CORE)
- resource.setrlimit(resource.RLIMIT_CORE, (0, 0))
+ resource.setrlimit(resource.RLIMIT_CORE, (0, self.old_limit[1]))
except (ValueError, resource.error):
pass