Commit 6fb3759c authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

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: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 5c457864
......@@ -705,9 +705,13 @@ 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);
if (me->pgid != me->pid.virt)
restore_pgid();
if (me->state != TASK_HELPER) {
......
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