Skip to content
Commit eb9a6f20 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov
Browse files

restore: add interface for creating helper tasks (v3)



They will be used for restoring sid. For example, if a session
group leader is absent, a helper process is created with this id
and it will die after restoring all other tasks.

Before this patch restore failed if anyone exited.
Now we should skip helpers, which exited successfully. It's a bit tricky.
All children are collected in sigchld_handler, but we have a point,
where we want to wait all helpers. For that waitpit is used and ECHLD
is ignored, because it signs that a helper exited and has been waited in
sigchld_handler.

v2: check that me isn't NULL in the sig handler
v3: move code about waiting helpers in a separate function

Signed-off-by: default avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: default avatarPavel Emelyanov <xemul@parallels.com>
parent acacc604
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment