mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-01 06:45:35 +00:00
restore: restore pgid in two phases
As described in the previous patch, process group leaders are restored in the first phase, then all other processes restores pgid. Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
5c45786417
commit
6fb3759c5f
@@ -705,10 +705,14 @@ static int restore_task_with_children(void *_arg)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (me->pgid == me->pid.virt)
|
||||||
|
restore_pgid();
|
||||||
|
|
||||||
futex_dec_and_wake(&task_entries->nr_in_progress);
|
futex_dec_and_wake(&task_entries->nr_in_progress);
|
||||||
futex_wait_while(&task_entries->start, CR_STATE_FORKING);
|
futex_wait_while(&task_entries->start, CR_STATE_FORKING);
|
||||||
|
|
||||||
restore_pgid();
|
if (me->pgid != me->pid.virt)
|
||||||
|
restore_pgid();
|
||||||
|
|
||||||
if (me->state != TASK_HELPER) {
|
if (me->state != TASK_HELPER) {
|
||||||
futex_dec_and_wake(&task_entries->nr_in_progress);
|
futex_dec_and_wake(&task_entries->nr_in_progress);
|
||||||
|
Reference in New Issue
Block a user