mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 14:25:49 +00:00
restorer: exit all threads in case of error
sys_exit() takes down only the currect thread. exit_group() should be used to take down all threads. Signed-off-by: Andrey Vagin <avagin@openvz.org> Looks-good-to: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
e2ba4892ca
commit
e15babbd96
@@ -56,6 +56,7 @@ __NR_set_thread_area 205 sys_set_thread_area (user_desc_t *info)
|
||||
__NR_get_thread_area 211 sys_get_thread_area (user_desc_t *info)
|
||||
__NR_set_tid_address 218 sys_set_tid_address (int *tid_addr)
|
||||
__NR_restart_syscall 219 sys_restart_syscall (void)
|
||||
__NR_exit_group 231 sys_exit_group (int error_code)
|
||||
__NR_open_by_handle_at 304 sys_open_by_handle_at (int mountdirfd, struct file_handle *handle, int flags)
|
||||
__NR_setns 308 sys_setns (int fd, int nstype)
|
||||
__NR_kcmp 312 sys_kcmp (pid_t pid1, pid_t pid2, int type, unsigned long idx1, unsigned long idx2)
|
||||
|
@@ -47,7 +47,7 @@ static void sigchld_handler(int signal, siginfo_t *siginfo, void *data)
|
||||
futex_abort_and_wake(&task_entries->nr_in_progress);
|
||||
/* sa_restorer may be unmaped, so we can't go back to userspace*/
|
||||
sys_kill(sys_getpid(), SIGSTOP);
|
||||
sys_exit(1);
|
||||
sys_exit_group(1);
|
||||
}
|
||||
|
||||
static void restore_creds(struct creds_entry *ce)
|
||||
@@ -226,7 +226,7 @@ long __export_restore_thread(struct thread_restore_args *args)
|
||||
core_restore_end:
|
||||
write_num_n(__LINE__);
|
||||
write_num_n(sys_getpid());
|
||||
sys_exit(-1);
|
||||
sys_exit_group(1);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -687,7 +687,7 @@ long __export_restore_task(struct task_restore_core_args *args)
|
||||
core_restore_end:
|
||||
write_num_n(__LINE__);
|
||||
write_num_n(sys_getpid());
|
||||
sys_exit(-1);
|
||||
sys_exit_group(1);
|
||||
return -1;
|
||||
|
||||
core_restore_failed:
|
||||
|
Reference in New Issue
Block a user