diff options
-rw-r--r-- | term/ptyio.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/term/ptyio.c b/term/ptyio.c index 44a215bb..2da7d6c8 100644 --- a/term/ptyio.c +++ b/term/ptyio.c @@ -331,6 +331,12 @@ pty_io_read (struct trivfs_protid *cred, } } + if (!(termflags & TTY_OPEN)) + { + pthread_mutex_unlock (&global_lock); + return EIO; + } + if (control_byte) { size = 1; |