Commit e8d51194 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

tty: Don't try to restore controlling terminal via ptmx

The slave peer should be restoring the controlling terminal.
It works for most of programs but need some more investigation
in future.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent f0606bc8
......@@ -683,6 +683,15 @@ static int tty_find_restoring_task(struct tty_info *info)
struct pstree_item *item;
if (info->tie->sid) {
/*
* If there a slave peer present then it will
* restore the controlling terminal.
*/
if (pty_is_master(info)) {
if (test_bit(info->tfe->tty_info_id - 1, tty_active_pairs))
return 0;
}
pr_info("Set a control terminal %x to %d\n",
info->tfe->id, info->tie->sid);
......
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