From: Shuanglei Tao Date: Sun, 12 May 2019 03:35:54 +0000 (+0800) Subject: utils: fix wait status X-Git-Url: http://git.prime8.dev/?a=commitdiff_plain;h=106902420a1b26978d37da88f2aeb7be9ba41453;p=ttyd.git utils: fix wait status --- diff --git a/src/utils.c b/src/utils.c index 680518c..1ab185a 100644 --- a/src/utils.c +++ b/src/utils.c @@ -95,7 +95,7 @@ wait_proc(pid_t in, pid_t *out) { int status = -1; if (WIFEXITED(stat)) { status = WEXITSTATUS(stat); - } else if (WIFSIGNALED(status)) { + } else if (WIFSIGNALED(stat)) { status = WTERMSIG(stat); } return status;