mirror of https://github.com/python/cpython
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)
This commit is contained in:
parent
84f31a5676
commit
284e5ce67e
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue