unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: master aeff424: Mark both ends of self-pipe a nonblocking.
       [not found] ` <20210123162744.5623820AD1@vcs0.savannah.gnu.org>
@ 2021-01-26 15:50   ` Robert Pluim
  2021-01-31 21:47     ` Philipp
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Pluim @ 2021-01-26 15:50 UTC (permalink / raw)
  To: emacs-devel; +Cc: Philipp Stephani

>>>>> 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())

Robert



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: master aeff424: Mark both ends of self-pipe a nonblocking.
  2021-01-26 15:50   ` master aeff424: Mark both ends of self-pipe a nonblocking Robert Pluim
@ 2021-01-31 21:47     ` Philipp
  0 siblings, 0 replies; 2+ messages in thread
From: Philipp @ 2021-01-31 21:47 UTC (permalink / raw)
  To: Robert Pluim; +Cc: Philipp Stephani, emacs-devel



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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-31 21:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20210123162742.7235.46247@vcs0.savannah.gnu.org>
     [not found] ` <20210123162744.5623820AD1@vcs0.savannah.gnu.org>
2021-01-26 15:50   ` master aeff424: Mark both ends of self-pipe a nonblocking Robert Pluim
2021-01-31 21:47     ` Philipp

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).