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 19:03:14 +0200

> From: Andreas Schwab <schwab@linux-m68k.org>
> Cc: emacs-devel@gnu.org,  phst@google.com,  p.stephani2@gmail.com
> Date: Wed, 20 Jan 2021 17:44:59 +0100
> 
> >> You cannot do that.  That creates races all over the place.
> >
> > What kind of races, and where in our code? please elaborate.
> 
> The signal can occur anytime.  When it interrupts the setup of the
> pselect call, chaos will ensure.  The only way to avoid that is to block
> the signal around the call.

What I described would be in the signal handler.

> Doing anything non-trivial in a signal handler is bound to problems.

Yes, I know.  I think resetting a bit in a variable is more trivial
than, say, writing to a pipe, something that we do now.



reply via email to

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