From 0e9d8df2d00e548de1d896fd7dc44c91ff7c9154 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Thu, 14 May 2020 10:23:12 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B2=BE=E7=AE=80=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 79870f14..709721f3 100644 --- a/server/Process.cpp +++ b/server/Process.cpp @@ -143,7 +143,7 @@ static bool s_wait(pid_t pid,int *exit_code_ptr,bool block) { pid_t p = waitpid(pid, &status, block ? 0 : WNOHANG); int exit_code = (status & 0xFF00) >> 8; if (exit_code_ptr) { - *exit_code_ptr = (status & 0xFF00) >> 8; + *exit_code_ptr = exit_code; } if (p < 0) { WarnL << "waitpid failed, pid=" << pid << ", err=" << get_uv_errmsg();