[Top][All Lists]

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

Re: master aeff424: Mark both ends of self-pipe a nonblocking.

From: Philipp
Subject: Re: master aeff424: Mark both ends of self-pipe a nonblocking.
Date: Sun, 31 Jan 2021 22:47:40 +0100

> Am 26.01.2021 um 16:50 schrieb Robert Pluim <rpluim@gmail.com>:
>>>>>> On Sat, 23 Jan 2021 11:27:43 -0500 (EST), p.stephani2@gmail.com (Philipp 
>>>>>> Stephani) said:
>    Philipp> branch: master
>    Philipp> commit aeff424c555da7e80775482db84eecef10286fc3
>    Philipp> Author: Philipp Stephani <phst@google.com>
>    Philipp> Commit: Philipp Stephani <phst@google.com>
>    Philipp>     Mark both ends of self-pipe a nonblocking.
>    Philipp>     While no deadlocks caused by the blocking write end have been 
> reported
>    Philipp>     yet, marking both ends nonblocking is consistent and also 
> recommended
>    Philipp>     in the GNU/Linux manpage of 'select'.
>    Philipp>     * src/process.c (child_signal_init): Mark write end of 
> self-pipe as
>    Philipp>     nonblocking.
> Iʼve not verified that itʼs due to this commit, but on macOS Iʼm
> now getting:
> src/emacs: reading from child signal FD: Resource temporarily unavailable
> so Iʼm guessing you need to handle EAGAIN (Iʼve added some debug to
> see what weʼre actually getting back from emacs_read())

Maybe the right approach is to just ignore (expected) errors from read and 
write on this pipe.  Writing is only used to notify pselect, and attempting to 
read the dummy byte twice shouldn’t hurt.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]