#159 当启用Breakpad后,禁用当前进程的Coredump功能。
This commit is contained in:
@@ -563,6 +563,14 @@ struct breakpad_instance * breakpad_init(const char * profile)
|
||||
TFE_LOG_ERROR(g_default_logger, "Breakpad upload init failed, using local breakpad dumpfile");
|
||||
instance->en_breakpad_upload = 0;
|
||||
}
|
||||
|
||||
/* When we use breakpad, do not generate any coredump file */
|
||||
const struct rlimit __rlimit_vars = {.rlim_cur = 0, .rlim_max = 0};
|
||||
ret = setrlimit(RLIMIT_CORE, &__rlimit_vars);
|
||||
if (ret < 0)
|
||||
{
|
||||
TFE_LOG_ERROR(g_default_logger, "setrlimit(RLIMIT_CORE, 0) failed: %s", strerror(errno));
|
||||
}
|
||||
}
|
||||
|
||||
if (instance->en_breakpad_upload)
|
||||
|
||||
Reference in New Issue
Block a user