From: Sukadev Bhattiprolu <sukadev@xxxxxxxxxxxxxxxxxx> Date: Sat, 6 Mar 2010 12:49:40 -0800 Subject: [PATCH 12/14][user-cr] app_restart(): mnt-pty implies mntns If the mount_pty is set, mntns must be implied, otherwise the newinstance mount of devpts will make the ptys in the original pts instance inaccessible. parse_args() does this correctly, but move the code into app_restart() so other callers of app_restart() also get this behavior. Signed-off-by: Sukadev Bhattiprolu <sukadev@xxxxxxxxxxxxxxxxxx> --- restart-main.c | 4 ---- restart.c | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/restart-main.c b/restart-main.c index 237742e..36318a4 100644 --- a/restart-main.c +++ b/restart-main.c @@ -324,10 +324,6 @@ static void parse_args(struct app_restart_args *args, int argc, char *argv[]) exit(1); } } - - - if (args->mnt_pty) - args->mntns = 1; } int main(int argc, char *argv[]) diff --git a/restart.c b/restart.c index 139f6db..d7b5b72 100644 --- a/restart.c +++ b/restart.c @@ -404,6 +404,9 @@ int process_args(struct app_restart_args *args) if (args->klogfd < 0) args->klogfd = CHECKPOINT_FD_NONE; + if (args->mnt_pty) + args->mntns = 1; + return 0; } -- 1.6.0.4 _______________________________________________ Containers mailing list Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/containers