[CRIU] [PATCH 3/6] tty: Make sure we're opening unpaired pty
Cyrill Gorcunov
gorcunov at openvz.org
Thu Mar 19 08:13:10 PDT 2015
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 at openvz.org>
---
tty.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tty.c b/tty.c
index 76fe0955edf9..8bed466b7ced 100644
--- a/tty.c
+++ b/tty.c
@@ -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);
--
1.9.3
More information about the CRIU
mailing list