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:Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
Showing
Please
register
or
sign in
to comment