Commit 4a393715 authored by Dmitry Safonov's avatar Dmitry Safonov Committed by Pavel Emelyanov

seize: do not try to detach killed tasks

unseize_task_and_threads sends SIGKILL in unseize_task under condition
(st == TASK_DEAD). Which obviously kills task.

Move freezer_detach after pstree_wait to detach only from alive tasks
to get rid of the following errors:
	(00.242163) Error (seize.c:223): Unable to detach from 23064
	: No such process
	(00.242177) Error (seize.c:223): Unable to detach from 23065
	: No such process
Signed-off-by: 's avatarDmitry Safonov <dsafonov@odin.com>
Acked-by: 's avatarAndrew Vagin <avagin@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent d58f6b70
......@@ -452,10 +452,10 @@ void pstree_switch_state(struct pstree_item *root_item, int st)
for_each_pstree_item(item)
unseize_task_and_threads(item, st);
freezer_detach();
if (st == TASK_DEAD)
pstree_wait(root_item);
freezer_detach();
}
static pid_t item_ppid(const struct pstree_item *item)
......
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