Subject: bug#57699: Assertion failure "lib_child_handler != dummy_handler"

From: Lars Ingebrigtsen <[email-masked]>
Date: Fri, 09 Sep 2022 19:13:10 +0200

Stefan Monnier <[email-masked]> writes:

> -      eassert (lib_child_handler != dummy_handler);
> -      signal_handler_t lib_child_handler_glib = lib_child_handler;
> -      catch_child_signal ();
> -      eassert (lib_child_handler == dummy_handler);
> -      lib_child_handler = lib_child_handler_glib;
> +      /* Apparently more recent versions of glib do not set this handler
> +         any more, so make sure the dance is needed before going for it.  */
> +      if (lib_child_handler != dummy_handler)
> +        {
> +          signal_handler_t lib_child_handler_glib = lib_child_handler;
> +          catch_child_signal ();
> +          eassert (lib_child_handler == dummy_handler);
> +          lib_child_handler = lib_child_handler_glib;

Perhaps Paul has some comments here; added to the CCs.