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 <yummypeng@linux.alibaba.com>
  • Loading branch information
yummypeng authored and rst0git committed Jan 19, 2025
1 parent 27a5b9a commit ca90d8e
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 @@ -707,8 +707,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 @@ -746,6 +744,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 ca90d8e

Please sign in to comment.