Bug#755295: Hurd term server (was: Hurd GCC ping)
- To: Thomas Schwinge <thomas@codesourcery.com>
- Cc: bug-hurd@gnu.org, Richard Braun <rbraun@sceen.net>, Roland McGrath <roland@hack.frob.com>, Matthias Klose <doko@ubuntu.com>, Thomas Bushnell <tb@becket.net>, 755295@bugs.debian.org, marcus.brinkmann@ruhr-uni-bochum.de, Miles Bader <miles@gnu.org>
- Subject: Bug#755295: Hurd term server (was: Hurd GCC ping)
- From: Samuel Thibault <samuel.thibault@gnu.org>
- Date: Sun, 2 Nov 2014 16:38:23 +0100
- Message-id: <[🔎] 20141102153823.GH2991@type.youpi.perso.aquilenet.fr>
- Mail-followup-to: Thomas Schwinge <thomas@codesourcery.com>, bug-hurd@gnu.org, Richard Braun <rbraun@sceen.net>, Roland McGrath <roland@hack.frob.com>, Matthias Klose <doko@ubuntu.com>, Thomas Bushnell <tb@becket.net>, 755295@bugs.debian.org, marcus.brinkmann@ruhr-uni-bochum.de, Miles Bader <miles@gnu.org>
- Reply-to: Samuel Thibault <samuel.thibault@gnu.org>, 755295@bugs.debian.org
- In-reply-to: <87d2a1paaj.fsf@kepler.schwinge.homeip.net>
- References: <53CAA84C.6080301@debian.org> <53EDFDC1.9050205@ubuntu.com> <87vbpogj0r.fsf@schwinge.name> <87iojtpi1s.fsf@kepler.schwinge.homeip.net> <87d2a1paaj.fsf@kepler.schwinge.homeip.net>
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: