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.
This commit is contained in:
parent
19d0d54809
commit
48d4dd974f
|
@ -0,0 +1,2 @@
|
|||
Fix faulthandler_suppress_crash_report() used to prevent core dump files
|
||||
when testing crashes. getrlimit() returns zero on success.
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue