[CRIU] [PATCH cr 04/10] restore: add interface for creating helper tasks (v3)

Andrey Vagin avagin at openvz.org
Thu Jun 21 03:35:28 EDT 2012


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 at openvz.org>
---
 cr-restore.c    |   90 ++++++++++++++++++++++++++++++++++++++++++++++++++----
 include/image.h |    1 +
 2 files changed, 84 insertions(+), 7 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-restore-add-interface-for-creating-helper-tasks-v3.patch
Type: text/x-patch
Size: 3612 bytes
Desc: not available
Url : http://openvz.org/pipermail/criu/attachments/20120621/f1f0d28d/0004-restore-add-interface-for-creating-helper-tasks-v3-0001.bin


More information about the CRIU mailing list