2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 13:58:34 +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:
Andrey Vagin 2012-07-02 15:25:00 +04:00 committed by Pavel Emelyanov
parent 5c45786417
commit 6fb3759c5f

View File

@ -705,10 +705,14 @@ static int restore_task_with_children(void *_arg)
exit(1);
}
if (me->pgid == me->pid.virt)
restore_pgid();
futex_dec_and_wake(&task_entries->nr_in_progress);
futex_wait_while(&task_entries->start, CR_STATE_FORKING);
restore_pgid();
if (me->pgid != me->pid.virt)
restore_pgid();
if (me->state != TASK_HELPER) {
futex_dec_and_wake(&task_entries->nr_in_progress);