[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#6074: accept-process-output on listening sockets cause non-interrupt
From: |
Lars Ingebrigtsen |
Subject: |
bug#6074: accept-process-output on listening sockets cause non-interruptible infloop |
Date: |
Mon, 14 Sep 2020 15:21:11 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#6074: accept-process-output on listening sockets cause non-interruptible infloop,
Lars Ingebrigtsen <=