Hook for `_exit'

Po Lu luangruo@yahoo.com
Fri Aug 5 06:59:05 GMT 2022


I'd like to ask for a hook run before _exit kills the current thread.
The reason for requesting such a hook is that badly behaved libraries
such as GTK call _exit when the display connection is lost, without
leaving programs a chance to perform cleanup, such as saving files that
the user was working on.

AFAIR, the GTK developers have already mentioned that they are unwilling
to add such a hook on their end (especially to GTK 3, which is no longer
receiving new features), and the chance of updated GTK versions getting
to users is exceedingly slim.

A real life example of this problem would be:

  https://lists.gnu.org/archive/html/bug-gnu-emacs/2022-08/msg00433.html

Where a user experienced a display disconnect, and as a result lost all
of his work with no clear indication of what happened.

Thanks in advance.


More information about the Libc-alpha mailing list