commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hurd] 12/26: term: fix read on a closed PTY


From: Samuel Thibault
Subject: [hurd] 12/26: term: fix read on a closed PTY
Date: Sat, 02 Nov 2013 14:44:44 +0000

This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch upstream
in repository hurd.

commit 1cfdceba98c380ad1cebb3a6b3d1f141d852c691
Author: Richard Braun <address@hidden>
Date:   Mon Oct 14 20:48:25 2013 +0200

    term: fix read on a closed PTY
    
    * term/ptyio.c (pty_io_read): Return EIO if the terminal has been closed.
---
 term/ptyio.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/term/ptyio.c b/term/ptyio.c
index 44a215b..2da7d6c 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;

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/hurd.git



reply via email to

[Prev in Thread] Current Thread [Next in Thread]