Subject: bug#53013: 29.0.50; xwidget-webkit: SIGCHLD not being caught after xwidget-webkit buffer killed

From: Akira Kyle <[email-masked]>
Date: Tue, 4 Jan 2022 22:04:22 -0700

On Tue, Jan 4, 2022 at 7:40 PM Po Lu <[email-masked]> wrote:
>
> > I suspect that a call to catch_child_signal might also be needed in
> > kill_xwidget so emacs reinstalls its signal handler.
>
> Should be fixed now on master.
>

It looks like SIGCHLD is now being caught by emacs for me. Thanks!

> Making kill_xwidget call catch_child_signal wasn't enough, since GLib
> was resetting SIGCHLD inside a timer set by WebKitGTK and about a dozen
> other places as well, hence the very ugly (and unreliable) hack on
> master.
>
> It's a temporary solution that just motivated me to look at making Emacs
> use GLib for handling subprocesses.

Indeed GLib does appear to want to always own the signal handling and
I imagine the current hacks of trying to constantly reinstall the
handler are also potentially brittle solutions to the problem.