> > Does _exit in glibc provide any hooks that we could use? Emacs cannot > be the first application that doesn't want misbehaving libraries to > forcibly exit it. > It's possible (albeit tricky) to escape an _exit() call by using LD_PRELOAD, see attached example. Whether this is usable for Emacs, I don't know.