all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Pip Cet <pipcet@gmail.com>
Cc: 6074@debbugs.gnu.org
Subject: bug#6074: accept-process-output on listening sockets cause non-interruptible infloop
Date: Mon, 14 Sep 2020 15:21:11 +0200	[thread overview]
Message-ID: <87o8m8a3zs.fsf@gnus.org> (raw)
In-Reply-To: <CAOqdjBfmSXGRW9VukWe2ARvWVqp=DR59UV11_n0UMTKcu3+iOg@mail.gmail.com> (Pip Cet's message of "Mon, 22 Jul 2019 17:45:18 +0000")

Pip Cet <pipcet@gmail.com> writes:

> 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?

[...]

>  	    {
> +	      unsigned int count = 0;
>  	      XSETPROCESS (proc, wait_proc);
>  
>  	      while (true)
>  		{
>  		  int nread = read_process_output (proc, wait_proc->infd);
> +		  rarely_quit (++count);
>  		  if (nread < 0)
>  		    {
> -		      if (errno == EIO || would_block (errno))
> +		      if (errno != EINTR)
>  			break;
>  		    }
>  		  else

There was no followup on this patch at the time (except Richard chiding
you for using forbidden terminology), but I tried the patch now, and it
seems to fix the issue, so I've applied it to the trunk now.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2020-09-14 13:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-01 22:15 bug#6074: 24.0.50; accept-process-output on listening sockets not incorruptible Helmut Eller
2019-07-22  3:52 ` bug#6074: accept-process-output on listening sockets cause non-interruptible infloop Pip Cet
2019-07-22 14:26   ` Eli Zaretskii
2019-07-22 17:45     ` Pip Cet
2020-09-14 13:21       ` Lars Ingebrigtsen [this message]
2019-07-23  2:46   ` Richard Stallman
2019-07-23 14:31     ` Pip Cet
2019-07-25  3:08       ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o8m8a3zs.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=6074@debbugs.gnu.org \
    --cc=pipcet@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.