mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-01 23:05:39 +00:00
pstree: don't replace sid if the root task is a session leader
The root task must remain a session leader after c/r. The root task can be executed in another pidns and the sid from another name space will be invalid. Cc: Cyrill Gorcunov <gorcunov@openvz.org> Reported-by: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: Andrey Vagin <avagin@openvz.org> Acked-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
ddc6789dca
commit
8eabba3d1c
3
pstree.c
3
pstree.c
@@ -154,6 +154,9 @@ static int prepare_pstree_for_shell_job(void)
|
|||||||
if (!opts.shell_job)
|
if (!opts.shell_job)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if (root_item->sid == root_item->pid.virt)
|
||||||
|
return 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Migration of a root task group leader is a bit tricky.
|
* Migration of a root task group leader is a bit tricky.
|
||||||
* When a task yields SIGSTOP, the kernel notifies the parent
|
* When a task yields SIGSTOP, the kernel notifies the parent
|
||||||
|
Reference in New Issue
Block a user