]> prime8.dev >> repos - ttyd.git/commitdiff
utils: fix wait status
authorShuanglei Tao <tsl0922@gmail.com>
Sun, 12 May 2019 03:35:54 +0000 (11:35 +0800)
committerShuanglei Tao <tsl0922@gmail.com>
Sun, 12 May 2019 03:35:54 +0000 (11:35 +0800)
src/utils.c

index 680518c491ce50e3b570f0405b3d948be131d9c2..1ab185a7af37f7404f955df428f29b0ec1009340 100644 (file)
@@ -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;