From 66b892406769c331c11837bc7492817cc370c1fc Mon Sep 17 00:00:00 2001 From: luqiuwen Date: Fri, 20 Sep 2019 15:56:42 +0800 Subject: [PATCH] =?UTF-8?q?#159=20=E5=BD=93=E5=90=AF=E7=94=A8Breakpad?= =?UTF-8?q?=E5=90=8E=EF=BC=8C=E7=A6=81=E7=94=A8=E5=BD=93=E5=89=8D=E8=BF=9B?= =?UTF-8?q?=E7=A8=8B=E7=9A=84Coredump=E5=8A=9F=E8=83=BD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platform/src/proxy.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/platform/src/proxy.cpp b/platform/src/proxy.cpp index 9227ec0..2b99268 100644 --- a/platform/src/proxy.cpp +++ b/platform/src/proxy.cpp @@ -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)