[Devel] [PATCH criu 2/3] action-scripts: Export mount namespace roots via CRIU_MNT_NS_ROOTS
Cyrill Gorcunov
gorcunov at gmail.com
Tue Oct 24 10:13:24 MSK 2017
On Mon, Oct 23, 2017 at 03:30:25PM -0700, Andrei Vagin wrote:
> > @@ -76,6 +77,7 @@ static int run_shell_scripts(const char *action)
> > return -1;
> >
> > if (!(env_set & ENV_ROOTPID) && root_item) {
> > + char mnt_ns_roots[PATH_MAX];
>
> Should it be declared in a block where it is initialized?
OK
>
> > int pid;
> > char root_item_pid[16];
> >
> > @@ -86,6 +88,11 @@ static int run_shell_scripts(const char *action)
> > pr_perror("Can't set CRTOOLS_INIT_PID=%s", root_item_pid);
> > return -1;
> > }
> > + export_mnt_ns_roots(mnt_ns_roots, sizeof(mnt_ns_roots));
> > + if (setenv("CRIU_MNT_NS_ROOTS", mnt_ns_roots, 1)) {
> > + pr_perror("Can't set CRIU_MNT_ROOTS=%s", mnt_ns_roots);
> > + return -1;
> > + }
>
> I don't like the idea to transfer mnt_ns_roots for all scripts with
> ENV_ROOTPID.
>
> It has a meaning only for post-namespace
Will rework.
More information about the Devel
mailing list