GNU bug report logs - #6074
accept-process-output on listening sockets cause non-interruptible infloop

Previous Next

Package: emacs;

Reported by: Helmut Eller <eller.helmut <at> gmail.com>

Date: Sat, 1 May 2010 22:18:01 UTC

Severity: normal

Tags: confirmed, fixed

Found in versions 24.0.50, 25.2

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Pip Cet <pipcet <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 6074 <at> debbugs.gnu.org
Subject: bug#6074: accept-process-output on listening sockets cause non-interruptible infloop
Date: Mon, 22 Jul 2019 17:45:18 +0000
[Message part 1 (text/plain, inline)]
On Mon, Jul 22, 2019 at 2:26 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> > From: Pip Cet <pipcet <at> gmail.com>
> > Date: Mon, 22 Jul 2019 03:52:33 +0000
> >
> > diff --git a/src/process.c b/src/process.c
> > index abadabe77e..1311409274 100644
> > --- a/src/process.c
> > +++ b/src/process.c
> > @@ -5277,7 +5277,9 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
> >                 int nread = read_process_output (proc, wait_proc->infd);
> >                 if (nread < 0)
> >                   {
> > -                   if (errno == EIO || would_block (errno))
> > +                   if (errno == EINTR)
> > +                     continue;
> > +                   else
> >                       break;
> >                   }
> >                 else
>
> Isn't it better to simply call rarely_quit inside the loop?

Why would we try again after receiving EINVAL? I believe the right
behavior is to return immediately in this case, just as we do for EIO.

However, we should probably call rarely_quit inside the loop, anyway,
to catch the case of a kernel bug keeping us busy with EINTRs. How's
this?
[0001-Don-t-retry-reading-after-receiving-EINVAL-bug-6074.patch (text/x-patch, attachment)]

This bug report was last modified 4 years and 308 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.