From 153aaa269ceef77ceea26a1629ee9c3f550d7514 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Fri, 2 Aug 2013 00:08:51 +0200 Subject: 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) --- Lib/test/test_subprocess.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/test/test_subprocess.py') diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index 7899aebe06..3bbb19c573 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 -- cgit v1.2.1