mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 14:25:49 +00:00
tty: Make sure we're opening unpaired pty
pty_open_unpaired_slave must be called for pty peers only and it caused no problems so far but better to be sure it's pty peer we're restoring (there gonna be more drivers with time). Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
e558d58a28
commit
80a134a44b
2
tty.c
2
tty.c
@@ -957,7 +957,7 @@ static int tty_open(struct file_desc *d)
|
|||||||
if (!info->create)
|
if (!info->create)
|
||||||
return receive_tty(info);
|
return receive_tty(info);
|
||||||
|
|
||||||
if (!tty_is_master(info))
|
if (is_pty(info->driver) && !tty_is_master(info))
|
||||||
return pty_open_unpaired_slave(d, info);
|
return pty_open_unpaired_slave(d, info);
|
||||||
|
|
||||||
return info->driver->open(info);
|
return info->driver->open(info);
|
||||||
|
Reference in New Issue
Block a user