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

Bug#755295: Hurd term server (was: Hurd GCC ping)



Hello,

Thomas Schwinge, le Thu 09 Oct 2014 16:50:12 +0200, a écrit :
> It is, after all, a regression, due to a fix "recently" applied by
> Richard:
> 
>     commit 1cfdceba98c380ad1cebb3a6b3d1f141d852c691
>     Author: Richard Braun <rbraun@sceen.net>
>     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.
> 
> ..., which addresses the issue filed at the end of
> <http://www.gnu.org/software/hurd/hurd/translator/term.html>, »screen
> Logout Hang«. 

Does the patch below fix the expect issue?

Samuel

diff --git a/term/ptyio.c b/term/ptyio.c
index 211e70a..6b01585 100644
--- a/term/ptyio.c
+++ b/term/ptyio.c
@@ -331,7 +331,7 @@ pty_io_read (struct trivfs_protid *cred,
 	}
     }
 
-  if (!(termflags & TTY_OPEN))
+  if (!(termflags & TTY_OPEN) && !qsize (outputq))
     {
       pthread_mutex_unlock (&global_lock);
       return EIO;


Reply to: