[CRIU] [PATCH] service: add ability to set inherit file descriptors (v2)
Pavel Emelyanov
xemul at parallels.com
Mon Mar 30 02:28:35 PDT 2015
> @@ -344,6 +345,15 @@ static int setup_opts_from_req(int sk, CriuOpts *req)
> goto err;
> }
>
> + for (i = 0; i < req->n_inherit_fd; i++) {
> + if (!opts.swrk_restore) {
:( It works, yes, but... can we check for swrk_restore once? Or at least
make sure gcc optimizes this (I don't believe it does, though).
> + pr_err("inherit_fd is not allowed in standalone service\n");
> + goto err;
> + }
> + if (inherit_fd_add(req->inherit_fd[i]->fd, req->inherit_fd[i]->key))
> + goto err;
> + }
> +
> for (i = 0; i < req->n_cg_root; i++) {
> if (new_cg_root_add(req->cg_root[i]->ctrl,
> req->cg_root[i]->path))
More information about the CRIU
mailing list