• Kirill Tkhai's avatar
    restore: Split restore_one_helper() and wait exiting zombie children · e23806f3
    Kirill Tkhai authored
    Zombie is also can be choosen as a parent for task helper like
    any other task.
    
    If the task helper exits between restore_finish_stage(CR_STATE_RESTORE)
    and zombie_prepare_signals()->SIG_UNBLOCK, the standard criu SIGCHLD
    handler is called, and the restore fails:
    
    (00.057762)     41: Error (criu/cr-restore.c:1557): 40 exited, status=0
    (00.057815) Error (criu/cr-restore.c:2465): Restoring FAILED.
    
    This patch makes restore_one_zombie() behave as restore_one_helper()
    and to wait children exits before allowing SIGCHLD. This makes us
    safe against races with exiting children.
    
    See next patch for test details.
    Signed-off-by: 's avatarKirill Tkhai <ktkhai@virtuozzo.com>
    Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
    e23806f3
Name
Last commit
Last update
Documentation Loading commit data...
compel Loading commit data...
contrib Loading commit data...
coredump Loading commit data...
crit Loading commit data...
criu Loading commit data...
images Loading commit data...
include/common Loading commit data...
lib Loading commit data...
scripts Loading commit data...
soccr Loading commit data...
test Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
INSTALL.md Loading commit data...
Makefile Loading commit data...
Makefile.compel Loading commit data...
Makefile.config Loading commit data...
Makefile.install Loading commit data...
Makefile.versions Loading commit data...
README.md Loading commit data...