Skip to content

Commit ca90d8e

Browse files
yummypengrst0git
authored andcommitted
seize: Adjust the position of the log message
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]>
1 parent 27a5b9a commit ca90d8e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

criu/seize.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -707,8 +707,6 @@ static int collect_children(struct pstree_item *item)
707707
goto free;
708708
}
709709

710-
pr_info("Seized task %d, state %d\n", pid, ret);
711-
712710
c = alloc_pstree_item();
713711
if (c == NULL) {
714712
ret = -1;
@@ -746,6 +744,8 @@ static int collect_children(struct pstree_item *item)
746744
if (ret == TASK_STOPPED)
747745
c->pid->stop_signo = compel_parse_stop_signo(pid);
748746

747+
pr_info("Seized task %d, state %d\n", pid, ret);
748+
749749
c->pid->real = pid;
750750
c->parent = item;
751751
c->pid->state = ret;

0 commit comments

Comments
 (0)