Skip to content

Commit

Permalink
restore: print a error if ptrace() failed
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
avagin committed Feb 16, 2018
1 parent 04c1634 commit 802caf0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion criu/cr-restore.c
Original file line number Diff line number Diff line change
Expand Up @@ -1564,7 +1564,8 @@ static void sigchld_handler(int signal, siginfo_t *siginfo, void *data)
if (!current && WIFSTOPPED(status) &&
WSTOPSIG(status) == 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;
}

Expand Down

0 comments on commit 802caf0

Please sign in to comment.