From 6fdac508186fd645cc0a05a8bf82ea17e4662eb9 Mon Sep 17 00:00:00 2001 From: Yuanhong Peng Date: Thu, 19 Dec 2024 14:30:41 +0800 Subject: [PATCH] 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 --- criu/seize.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/criu/seize.c b/criu/seize.c index 829d7c278..007e8e580 100644 --- a/criu/seize.c +++ b/criu/seize.c @@ -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; @@ -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;