Commit 39e6d7f5 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

restore: decode exit status in sigchld_handler

Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 70d86e08
...@@ -958,6 +958,8 @@ static void sigchld_handler(int signal, siginfo_t *siginfo, void *data) ...@@ -958,6 +958,8 @@ static void sigchld_handler(int signal, siginfo_t *siginfo, void *data)
pid = waitpid(root_item->pid.real, &status, WNOHANG); pid = waitpid(root_item->pid.real, &status, WNOHANG);
if (pid <= 0) if (pid <= 0)
return; return;
exit = WIFEXITED(status);
status = exit ? WEXITSTATUS(status) : WTERMSIG(status);
} }
if (!current || status) if (!current || status)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment