[CRIU] [PATCH v2] criu: tty: pick only master as a control terminal
Dmitry Safonov
dsafonov at odin.com
Wed Dec 9 09:14:12 PST 2015
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-42093
Signed-off-by: Dmitry Safonov <dsafonov at odin.com>
---
tty.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tty.c b/tty.c
index 1286742..a5338d2 100644
--- a/tty.c
+++ b/tty.c
@@ -1185,6 +1185,9 @@ int tty_setup_slavery(void)
info->driver->type == TTY_TYPE__CTTY)
continue;
+ if (!tty_is_master(info))
+ continue;
+
info->ctl_tty = info;
pr_debug("ctl tty leader %x\n", info->tfe->id);
peer = info;
--
2.6.3
More information about the CRIU
mailing list