Commit 7571ff69 authored by Pavel Emelyanov's avatar Pavel Emelyanov

collect: Properly report tasks collecting error

When we've failed to seize tasks we should report this error to the caller.
Reported-by: 's avatarKevin Wilson <wkevils@gmail.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 118526cc
...@@ -1046,8 +1046,10 @@ static int collect_pstree(pid_t pid, const struct cr_options *opts) ...@@ -1046,8 +1046,10 @@ static int collect_pstree(pid_t pid, const struct cr_options *opts)
* rather than trying to chase them. * rather than trying to chase them.
*/ */
try_again: try_again:
if (attempts == 0) if (attempts == 0) {
break; pr_err("Can't freeze the tree\n");
return -1;
}
attempts--; attempts--;
pr_info("Trying to suspend tasks again\n"); pr_info("Trying to suspend tasks again\n");
......
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