Hook for `_exit'
Po Lu
luangruo@yahoo.com
Fri Aug 5 08:35:26 GMT 2022
Florian Weimer <fweimer@redhat.com> writes:
> I think even if we add the hook in glibc, GTK will find a way to
> terminate the process immediately by other means.
GTK 3 is already in maintenance mode, so I doubt their developers will
deliberately break programs relying on such a hook. In any case, it
will let us ship a fix for this common problem to our users now, and
negotiate with the GTK developers later should they break it.
> We already have exit, yet GTK deliberately chose not to use it. So it
> doesn't look like something that can be solved with an in-process
> hook.
[...]
> If you need to use a library with such an approach to error handling,
> but you want to recover from errors, you need to use fork and confine
> its use to a subprocess, and employ some IPC mechanism to maintain
> relevant state in a more persistent process (or keep a redo log in the
> file system).
I guess that would be possible in theory, but it will be difficult to
work with in Emacs. With that amount of effort, one might as well throw
away GTK altogether and write a Wayland client from scratch.
Thanks.
More information about the Libc-alpha
mailing list