summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2013-08-01 22:08:51 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2013-08-01 22:08:51 (GMT)
commit284e5ce67ec0ffcc3feb5d8526727fa3a8c35f7a (patch)
tree1302af28cc6c3414dab52284f4eb031051f07fe7 /Lib/test
parent84f31a567627bc69204caf2d801a63c7f96207eb (diff)
downloadcpython-284e5ce67ec0ffcc3feb5d8526727fa3a8c35f7a.zip
cpython-284e5ce67ec0ffcc3feb5d8526727fa3a8c35f7a.tar.gz
cpython-284e5ce67ec0ffcc3feb5d8526727fa3a8c35f7a.tar.bz2
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')
-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 7899aeb..3bbb19c 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