mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
修复android下编译问题
This commit is contained in:
parent
f2edf354de
commit
9a26ba9f8a
@ -108,10 +108,17 @@ void Process::run(const string &cmd, const string &log_file_tmp) {
|
||||
}
|
||||
fprintf(stderr, "\r\n\r\n#### pid=%d,cmd=%s #####\r\n\r\n", getpid(), cmd.data());
|
||||
|
||||
#ifndef ANDROID
|
||||
//关闭父进程继承的fd
|
||||
for (int i = 3; i < getdtablesize(); i++) {
|
||||
::close(i);
|
||||
}
|
||||
#else
|
||||
//关闭父进程继承的fd
|
||||
for (int i = 3; i < 1024; i++) {
|
||||
::close(i);
|
||||
}
|
||||
#endif
|
||||
|
||||
auto params = split(cmd, " ");
|
||||
// memory leak in child process, it's ok.
|
||||
|
Loading…
Reference in New Issue
Block a user