Fix faulthandler_suppress_crash_report() used to prevent core dump files
when testing crashes. getrlimit() returns zero on success.
(cherry picked from commit
48d4dd974f0c8d47c54990eedd322b96b19c60ec)
--- /dev/null
+Fix faulthandler_suppress_crash_report() used to prevent core dump files
+when testing crashes. getrlimit() returns zero on success.
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);
}