• Pavel Emelyanov's avatar
    criu: Restore tasks as siblings in swrk · 84eb0a19
    Pavel Emelyanov authored
    Andrey validly pointed out, that restoring pdeath_sig is not
    compatible with criu_restore_child() call -- after criu restore
    children, it will exit and fire the pdeath_sig into restored
    tree root, potentially killing it.
    
    The fix for that could be -- when started in swrk more, criu can
    restore tree not as children tasks, but as siblings, using the
    CLONE_PARENT flag when fork()-ing the root task.
    
    With this we should also take care about errors handing -- right
    now criu catches the SIGCHILD from dying children tasks, and
    since we plan to create them be children of the criu parent (the
    library caller) we will not be able to catch them. To do so we
    SEIZE the root task in advance thus causing all SIGCHLD-s go to
    criu, not to its parent.
    
    Having this done we no longer need the SUBREAPER trick in the
    library call -- tasks get restored right as callers kids :)
    
    Some thoughts for future -- using this trick we can finally make
    "natural" restoration of shell jobs. I.e. -- make criu restore
    some subtree right under bash, w/o leaving itself as intermediate
    task and w/o re-parenting the subtree to init after restore.
    Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
    Acked-by: 's avatarAndrey Vagin <avagin@parallels.com>
    84eb0a19
Name
Last commit
Last update
..
asm-generic Loading commit data...
bug.h Loading commit data...
cgroup.h Loading commit data...
compiler.h Loading commit data...
config-base.h Loading commit data...
cpu.h Loading commit data...
cr-service-const.h Loading commit data...
cr-service.h Loading commit data...
cr-show.h Loading commit data...
cr_options.h Loading commit data...
criu-log.h Loading commit data...
criu-plugin.h Loading commit data...
crtools.h Loading commit data...
err.h Loading commit data...
errno.h Loading commit data...
eventfd.h Loading commit data...
eventpoll.h Loading commit data...
fcntl.h Loading commit data...
fdset.h Loading commit data...
fifo.h Loading commit data...
file-ids.h Loading commit data...
file-lock.h Loading commit data...
files-reg.h Loading commit data...
files.h Loading commit data...
fs-magic.h Loading commit data...
fsnotify.h Loading commit data...
image-desc.h Loading commit data...
image.h Loading commit data...
inet_diag.h Loading commit data...
ipc_ns.h Loading commit data...
irmap.h Loading commit data...
kcmp-ids.h Loading commit data...
kcmp.h Loading commit data...
kerndat.h Loading commit data...
libnetlink.h Loading commit data...
list.h Loading commit data...
lock.h Loading commit data...
log.h Loading commit data...
magic.h Loading commit data...
mem.h Loading commit data...
mman.h Loading commit data...
mount.h Loading commit data...
namespaces.h Loading commit data...
net.h Loading commit data...
netfilter.h Loading commit data...
netlink_diag.h Loading commit data...
packet_diag.h Loading commit data...
page-pipe.h Loading commit data...
page-read.h Loading commit data...
page-xfer.h Loading commit data...
pagemap-cache.h Loading commit data...
parasite-syscall.h Loading commit data...
parasite.h Loading commit data...
pid.h Loading commit data...
pipes.h Loading commit data...
plugin.h Loading commit data...
posix-timer.h Loading commit data...
prctl.h Loading commit data...
proc_parse.h Loading commit data...
protobuf-desc.h Loading commit data...
protobuf.h Loading commit data...
pstree.h Loading commit data...
ptrace.h Loading commit data...
rbtree.h Loading commit data...
restorer.h Loading commit data...
rst-malloc.h Loading commit data...
rst_info.h Loading commit data...
servicefd.h Loading commit data...
shmem.h Loading commit data...
sigframe.h Loading commit data...
signalfd.h Loading commit data...
sk-inet.h Loading commit data...
sk-packet.h Loading commit data...
sk-queue.h Loading commit data...
sockets.h Loading commit data...
stats.h Loading commit data...
string.h Loading commit data...
syscall-types.h Loading commit data...
sysctl.h Loading commit data...
tty.h Loading commit data...
tun.h Loading commit data...
unix_diag.h Loading commit data...
util-pie.h Loading commit data...
util.h Loading commit data...
uts_ns.h Loading commit data...
vdso.h Loading commit data...
vma.h Loading commit data...
xmalloc.h Loading commit data...