From b2fe8c926c06faecac7201e44efb3a1d7b300c0d Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Sun, 17 Jan 2021 10:29:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/Process.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }