From: Akira Kyle Date: Mon, 9 Nov 2020 13:51:48 +0000 (+0100) Subject: Fix xwidget's webkitgtk widget overriding of Emacs SIGCHLD handler X-Git-Tag: emacs-28.0.90~5212^2~4 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a05810b2d5f1a87ad1b20c4e61adc464a31e315d;p=emacs.git Fix xwidget's webkitgtk widget overriding of Emacs SIGCHLD handler * src/xwidget.c (make-xwidget): Save and restore Emacs SIGCHLD signal handler since glib doesn't (but should) do this. Copyright-paperwork-exempt: yes --- diff --git a/src/xwidget.c b/src/xwidget.c index 031975fafb9..e078a28a35b 100644 --- a/src/xwidget.c +++ b/src/xwidget.c @@ -128,6 +128,16 @@ Returns the newly constructed xwidget, or nil if construction fails. */) if (EQ (xw->type, Qwebkit)) { xw->widget_osr = webkit_web_view_new (); + + /* webkitgtk uses GSubprocess which sets sigaction causing + Emacs to not catch SIGCHLD with its usual handle setup in + catch_child_signal(). This resets the SIGCHLD + sigaction. */ + struct sigaction old_action; + sigaction (SIGCHLD, NULL, &old_action); + webkit_web_view_load_uri(WEBKIT_WEB_VIEW (xw->widget_osr), + "about:blank"); + sigaction (SIGCHLD, &old_action, NULL); } gtk_widget_set_size_request (GTK_WIDGET (xw->widget_osr), xw->width,