emacs-devel
[Top][All Lists]
Advanced

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

Re: scratch/sigchld-fd 8f0ce42 1/2: Fix deadlock when receiving SIGCHLD


From: Eli Zaretskii
Subject: Re: scratch/sigchld-fd 8f0ce42 1/2: Fix deadlock when receiving SIGCHLD during 'pselect'.
Date: Wed, 20 Jan 2021 05:37:41 +0200

> From: Andreas Schwab <schwab@linux-m68k.org>
> Cc: Philipp Stephani <p.stephani2@gmail.com>,  phst@google.com,
>   emacs-devel@gnu.org
> Date: Tue, 19 Jan 2021 21:46:46 +0100
> 
> On Jan 19 2021, Eli Zaretskii wrote:
> 
> > I'd be happier if we had some direct evidence to these effects.  I'd
> > also be surprised to hear that pselect doesn't return with EINTR when
> > SIGCHLD comes in.  It is more likely that SIGCHLD is delivered before
> > we call pselect, but if that is the case, we should be able to
> > reliably detect that, I think.
> 
> If you want reliable detection of SIGCHLD, you need to block the signal
> around pselect and let pselect unblock it, atomically.

AFAIU, this is an issue for programs that install a SIGCHLD handler
immediately before calling pselect.  But Emacs has a SIGCHLD handler
installed at all times, so if the signal hits outside of the pselect
call, we should be able to detect that reliably.



reply via email to

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