[CRIU] [PATCH] restore: wait while processes are dying
Pavel Emelyanov
xemul at parallels.com
Mon Oct 12 03:10:06 PDT 2015
On 10/09/2015 05:41 PM, Andrey Vagin wrote:
> From: Andrew Vagin <avagin at openvz.org>
>
> If criu restore failed, criu should wait all processes.
... because otherwise ... ... ... what?
> Here we do this only for cases when processes are restored in a pid namespace.
>
> "Restoring FAILED." will be printed at the end of the log.
>
> Cc: Nikita Spiridonov <nspiridonov at odin.com>
> Reported-by: Nikita Spiridonov <nspiridonov at odin.com>
> Signed-off-by: Andrew Vagin <avagin at openvz.org>
> ---
> cr-restore.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/cr-restore.c b/cr-restore.c
> index fb86114..73097a9 100644
> --- a/cr-restore.c
> +++ b/cr-restore.c
> @@ -1940,9 +1940,15 @@ out_kill:
> * otherwise an external proccesses can be killed.
> */
> if (root_ns_mask & CLONE_NEWPID) {
> + int status;
> +
> /* Kill init */
> if (root_item->pid.real > 0)
> kill(root_item->pid.real, SIGKILL);
> +
> + if (waitpid(root_item->pid.real, &status, 0) < 0)
> + pr_warn("Unable to wait %d: %s",
> + root_item->pid.real, strerror(errno));
> } else {
> struct pstree_item *pi;
>
>
More information about the CRIU
mailing list