summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-12-11 12:57:12 (GMT)
committerGitHub <noreply@github.com>2017-12-11 12:57:12 (GMT)
commit48d4dd974f0c8d47c54990eedd322b96b19c60ec (patch)
tree965351bd1673276aff16ab38da96ce7d127906f9 /Modules
parent19d0d5480931117d9e0bf396a0234707bbdaa494 (diff)
downloadcpython-48d4dd974f0c8d47c54990eedd322b96b19c60ec.zip
cpython-48d4dd974f0c8d47c54990eedd322b96b19c60ec.tar.gz
cpython-48d4dd974f0c8d47c54990eedd322b96b19c60ec.tar.bz2
bpo-32252: Fix faulthandler_suppress_crash_report() (#4794)
Fix faulthandler_suppress_crash_report() used to prevent core dump files when testing crashes. getrlimit() returns zero on success.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/faulthandler.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c
index 0e85cce..baa2e91 100644
--- a/Modules/faulthandler.c
+++ b/Modules/faulthandler.c
@@ -932,7 +932,7 @@ faulthandler_suppress_crash_report(void)
struct rlimit rl;
/* Disable creation of core dump */
- if (getrlimit(RLIMIT_CORE, &rl) != 0) {
+ if (getrlimit(RLIMIT_CORE, &rl) == 0) {
rl.rlim_cur = 0;
setrlimit(RLIMIT_CORE, &rl);
}