diff options
| author | luqiuwen <[email protected]> | 2019-09-20 15:56:42 +0800 |
|---|---|---|
| committer | luqiuwen <[email protected]> | 2019-09-20 15:56:42 +0800 |
| commit | 66b892406769c331c11837bc7492817cc370c1fc (patch) | |
| tree | 4228a5195e8fa4b0ae758a76ace439f69719be04 /platform/src/proxy.cpp | |
| parent | a5cfc17de56e27a54e33f61ee80ab2bfbde8916f (diff) | |
#159 当启用Breakpad后,禁用当前进程的Coredump功能。
Diffstat (limited to 'platform/src/proxy.cpp')
| -rw-r--r-- | platform/src/proxy.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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) |
