[CRIU] Re: [PATCH 11/14] tty: Update tty verification procedure
Pavel Emelyanov
xemul at parallels.com
Mon Oct 15 12:03:38 EDT 2012
On 10/15/2012 06:54 PM, Cyrill Gorcunov wrote:
>
> We need to make sure that the only one external tty
> is present, since otherwise we have no idea on which
> pts index to connect them on restore.
>
> This patch extends tty_verify_active_pairs procedure to
> count how many external tty is present in the dump image.
>
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
> cr-dump.c | 2 +-
> include/tty.h | 2 +-
> tty.c | 23 +++++++++++++++++------
> 3 files changed, 19 insertions(+), 8 deletions(-)
>
> @@ -1630,7 +1630,7 @@ int cr_dump_tasks(pid_t pid, const struct cr_options *opts)
> if (ret)
> goto err;
>
> - ret = tty_verify_active_pairs();
> + ret = tty_verify_active_pairs(opts->shell_job);
> if (ret)
> goto err;
>
The opts() is _very_ good global variable. Don't scatter its misuse in cr_dump_tasks()
over other code.
More information about the CRIU
mailing list