Commit 3a244a0d authored by Dmitry Safonov's avatar Dmitry Safonov Committed by Pavel Emelyanov

criu: tty: pick only master as a control terminal

tty_find_restoring_task will prepare control terminal (by tcsetpgrp)
only if tty is master.
By a chance it's possible to pick slave terminal as a control, which
will refrain restoring control terminal.

https://jira.sw.ru/browse/PSBM-42093Signed-off-by: 's avatarDmitry Safonov <dsafonov@odin.com>
Reviewed-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 46b664e1
...@@ -1185,6 +1185,9 @@ int tty_setup_slavery(void) ...@@ -1185,6 +1185,9 @@ int tty_setup_slavery(void)
info->driver->type == TTY_TYPE__CTTY) info->driver->type == TTY_TYPE__CTTY)
continue; continue;
if (!tty_is_master(info))
continue;
info->ctl_tty = info; info->ctl_tty = info;
pr_debug("ctl tty leader %x\n", info->tfe->id); pr_debug("ctl tty leader %x\n", info->tfe->id);
peer = info; peer = info;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment