[Python-checkins] cpython: Fix the RLIMIT_CORE resource lowering logic in test_subprocess.

antoine.pitrou python-checkins at python.org
Fri Aug 2 00:09:15 CEST 2013


http://hg.python.org/cpython/rev/dae93ae6b713
changeset:   84962:dae93ae6b713
parent:      84958:62658d9d8926
user:        Antoine Pitrou <solipsis at pitrou.net>
date:        Fri Aug 02 00:08:51 2013 +0200
summary:
  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)

files:
  Lib/test/test_subprocess.py |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -1123,7 +1123,7 @@
         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
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list