mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 06:15:24 +00:00
parasite: send PARASITE_CMD_FINI before resuming the target process
The control socket has enough buffer for one command and the target process will not wait a new command, so we will avoid extra context switches. Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
8b9e18f07b
commit
e46a9f6bfc
@@ -863,17 +863,17 @@ static int parasite_fini_seized(struct parasite_ctl *ctl)
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = __parasite_execute_daemon(PARASITE_CMD_FINI, ctl);
|
||||
close_safe(&ctl->tsock);
|
||||
if (ret)
|
||||
return -1;
|
||||
|
||||
ret = ptrace(PTRACE_SYSCALL, pid, NULL, NULL);
|
||||
if (ret) {
|
||||
pr_perror("ptrace");
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = __parasite_execute_daemon(PARASITE_CMD_FINI, ctl);
|
||||
close_safe(&ctl->tsock);
|
||||
if (ret)
|
||||
return -1;
|
||||
|
||||
if (parasite_stop_on_syscall(1, __NR_rt_sigreturn))
|
||||
return -1;
|
||||
|
||||
|
Reference in New Issue
Block a user