2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +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:
Cyrill Gorcunov
2015-03-19 18:13:10 +03:00
committed by Pavel Emelyanov
parent e558d58a28
commit 80a134a44b

2
tty.c
View File

@@ -957,7 +957,7 @@ static int tty_open(struct file_desc *d)
if (!info->create)
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 info->driver->open(info);