Commit daaf73d3 by ziyue

修复cpu亲和性设置导致FFmpeg进程不能使用多核cpu的问题:#1149

parent d2a98785
......@@ -75,6 +75,8 @@ void Process::run(const string &cmd, const string &log_file_tmp) {
throw std::runtime_error(StrPrinter << "fork child process failed,err:" << get_uv_errmsg());
}
if (_pid == 0) {
//取消cpu亲和性设置,防止FFmpeg进程cpu占用率不能超过100%的问题
setThreadAffinity(-1);
string log_file;
if (log_file_tmp.empty()) {
//未指定子进程日志文件时,重定向至/dev/null
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论