Skip to content

Commit

Permalink
seize: Adjust the position of the log message
Browse files Browse the repository at this point in the history
Based on the code, the `ret` variable at this point does not
represent the task state, so this log message should be
moved to a position after the `compel_wait_task()` function.

Signed-off-by: Yuanhong Peng <[email protected]>
  • Loading branch information
yummypeng committed Dec 19, 2024
1 parent 32d5a76 commit 752364c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions criu/seize.c
Original file line number Diff line number Diff line change
Expand Up @@ -674,8 +674,6 @@ static int collect_children(struct pstree_item *item)
goto free;
}

pr_info("Seized task %d, state %d\n", pid, ret);

c = alloc_pstree_item();
if (c == NULL) {
ret = -1;
Expand Down Expand Up @@ -713,6 +711,8 @@ static int collect_children(struct pstree_item *item)
if (ret == TASK_STOPPED)
c->pid->stop_signo = compel_parse_stop_signo(pid);

pr_info("Seized task %d, state %d\n", pid, ret);

c->pid->real = pid;
c->parent = item;
c->pid->state = ret;
Expand Down

0 comments on commit 752364c

Please sign in to comment.