On 8/5/22 03:52, Po Lu via Libc-alpha wrote: > the GTK developers > are unwilling to provide proper hooks (or even to use exit) instead. Matthias suggested in <https://gitlab.gnome.org/GNOME/gtk/-/issues/4514> that Emacs could use a g_message hook and parse the message to determine that GTK is about to _exit. Although a horrible hack, I've seen worse hacks in Emacs.