mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue