Commit 284e5ce6 authored by Antoine Pitrou's avatar Antoine Pitrou

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)
parent 84f31a56
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment