Commit 790957ea authored by Dmitry Safonov's avatar Dmitry Safonov Committed by Pavel Emelyanov

criu: use strsignal to describe kill reason

Where it's possible to use glibc.
Signed-off-by: 's avatarDmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 89ba5489
......@@ -1304,7 +1304,8 @@ err:
if (exit)
pr_err("%d exited, status=%d\n", pid, status);
else
pr_err("%d killed by signal %d\n", pid, status);
pr_err("%d killed by signal %d: %s\n",
pid, status, strsignal(status));
futex_abort_and_wake(&task_entries->nr_in_progress);
}
......
......@@ -955,8 +955,8 @@ static void reap_worker(int signo)
pr_info("Worker(pid %d) exited with %d\n",
pid, WEXITSTATUS(status));
else if (WIFSIGNALED(status))
pr_info("Worker(pid %d) was killed by %d\n",
pid, WTERMSIG(status));
pr_info("Worker(pid %d) was killed by %d: %s\n", pid,
WTERMSIG(status), strsignal(WTERMSIG(status)));
}
}
......
......@@ -401,7 +401,8 @@ static void sigchld_handler(int signal, siginfo_t *siginfo, void *data)
if (WIFEXITED(status))
pr_err("%d exited with %d unexpectedly\n", pid, WEXITSTATUS(status));
else if (WIFSIGNALED(status))
pr_err("%d was killed by %d unexpectedly\n", pid, WTERMSIG(status));
pr_err("%d was killed by %d unexpectedly: %s\n",
pid, WTERMSIG(status), strsignal(WTERMSIG(status)));
else if (WIFSTOPPED(status))
pr_err("%d was stopped by %d unexpectedly\n", pid, WSTOPSIG(status));
......
......@@ -446,7 +446,8 @@ static void pstree_wait(struct pstree_item *root_item)
break;
} else {
if (!WIFSIGNALED(status) || WTERMSIG(status) != SIGKILL) {
pr_err("Unexpected exit code %d of %d\n", status, pid);
pr_err("Unexpected exit code %d of %d: %s\n",
status, pid, strsignal(status));
BUG();
}
}
......
......@@ -670,7 +670,8 @@ out_chld:
pr_err("exited, status=%d\n", WEXITSTATUS(status));
break;
} else if (WIFSIGNALED(status)) {
pr_err("killed by signal %d\n", WTERMSIG(status));
pr_err("killed by signal %d: %s\n", WTERMSIG(status),
strsignal(WTERMSIG(status)));
break;
} else if (WIFSTOPPED(status)) {
pr_err("stopped by signal %d\n", WSTOPSIG(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