Re: [PATCH] At-exit hook
Nala Ginrut <[email protected]>
| Newsgroups | gmane.lisp.guile.devel |
|---|---|
| Message-ID | <CAPjoZof8auFPsQzRtzPe7u6K3+DD=Px1FE9of4c8_FiavZTeeA@mail.gmail.com> |
How about using sigprocmask to disable async signals temporarily? On Thu, Nov 7, 2024 at 8:23 PM Maxime Devos <[email protected]> wrote: > ‘atexit’ functions are run at ‘exit’. ‘exit’ can be run from signal > handlers (*). Since the hook runs Scheme code, it could do a lot of > AC-unsafe things, resulting in problems. > > > > (*) glibc documentation says ‘exit’ is AC-unsafe, but this is unsupported > by POSIX AFAICT. OTOH the same applies to even ‘malloc’, so likely I’m > looking in the wrong places. > > > > Best regards, > > Maxime Devos >