[CRIU] [PATCH 3/3] parasite-syscall: Provide unified parasite_execute[_by_pid]() helpers

Cyrill Gorcunov gorcunov at openvz.org
Fri Mar 1 07:04:31 EST 2013


Once we have parasite_ctl::state initialized we can choose
which way to use for message delivery to a parasite code
automatically.

Thus get rid of parasite_execute_trap, parasite_execute_trap,
parasite_execute_daemon_by_pid, parasite_execute_daemon helpers
but instead provide unified parasite_execute procedure. This
hides internal details from caller, and caller don't need to
worry how exactly message is delivered to a parasite code.

Still there are a couple of commands which are exceptions from
general rule: parasite_init_threads_seized() and parasite_fini_seized()
simply because they are changing an internal behaviour of a daemon.

This approach allows to do a proper rollback in case if parasite
infection failed, or some error happens during main crtools module
lifetime.

Note the whole "daemon approach" do not implies "self-cure" mechanism
implemented (via rt-sigreturn and such in daemon code), this is
another task to be done.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 parasite-syscall.c | 73 +++++++++++++++++++++++++++---------------------------
 1 file changed, 37 insertions(+), 36 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-parasite-syscall-Provide-unified-parasite_execute-_b.patch
Type: text/x-patch
Size: 8031 bytes
Desc: not available
URL: <http://lists.openvz.org/pipermail/criu/attachments/20130301/96424b19/attachment-0001.bin>


More information about the CRIU mailing list