diff --git a/server/Process.cpp b/server/Process.cpp index 47ab2d21..b899499f 100644 --- a/server/Process.cpp +++ b/server/Process.cpp @@ -109,7 +109,7 @@ 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()); //关闭父进程继承的fd - for (int i = 3; i < 1024; i++) { + for (int i = 3; i < getdtablesize(); i++) { ::close(i); }