diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index 7899aebe062..3bbb19c573f 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -1123,7 +1123,7 @@ def __enter__(self): 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