mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-05-31 23:13:44 +08:00
FFmpeg禁止生产core文件
This commit is contained in:
@@ -44,6 +44,11 @@ void Process::run(const string &cmd, const string &log_file_tmp) {
|
||||
}
|
||||
if (_pid == 0) {
|
||||
//子进程
|
||||
|
||||
//子进程关闭core文件生成
|
||||
struct rlimit rlim = {0,0};
|
||||
setrlimit(RLIMIT_CORE, &rlim);
|
||||
|
||||
// ignore the SIGINT and SIGTERM
|
||||
signal(SIGINT, SIG_IGN);
|
||||
signal(SIGTERM, SIG_IGN);
|
||||
|
||||
Reference in New Issue
Block a user