Commit 8c87d345 authored by Andrei Vagin's avatar Andrei Vagin

restore: print a error if ptrace() failed

CID 85039 (#1 of 1): Unchecked return value (CHECKED_RETURN)
6. check_return: Calling ptrace without checking return value (as is done elsewhere 44 out of 49 times).
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent fd9f0aaa
...@@ -1361,7 +1361,8 @@ static void sigchld_handler(int signal, siginfo_t *siginfo, void *data) ...@@ -1361,7 +1361,8 @@ static void sigchld_handler(int signal, siginfo_t *siginfo, void *data)
if (!current && WIFSTOPPED(status) && if (!current && WIFSTOPPED(status) &&
WSTOPSIG(status) == SIGCHLD) { WSTOPSIG(status) == SIGCHLD) {
/* The root task is ptraced. Allow it to handle SIGCHLD */ /* The root task is ptraced. Allow it to handle SIGCHLD */
ptrace(PTRACE_CONT, siginfo->si_pid, 0, SIGCHLD); if (ptrace(PTRACE_CONT, pid, 0, SIGCHLD))
pr_perror("Unable to resume %d", pid);
return; return;
} }
......
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