On Thu, 25 Jun 2020 11:18:13 -0700 Yonatan Zunger via Python-Dev <python-dev@python.org> wrote: > Also, just to sanity-check that I understand things correctly: Python > signal handlers *are* reentrant, in that a signal handler can be > interrupted by another signal, is that right? Is there any general > recommendation on how to write signal handlers in order to manage that?
To be honest, I've never thought about that. If you need to care about reentrancy, you should perhaps use some kind of global flag to detect it (hopefully you won't run into weird edge cases...). > (Antoine, I *so* wish I could be doing less with signals and signal > handlers right now. Alas, I have a combination of a SIGTERM-happy runtime > environment and a long-story situation involving wacky multiprocessing to > avoid issues in someone else's C library that make that impossible. So > instead I'm trying to write a general library to help simplify the task, > and so thinking about a lot of slightly nutty corner cases...) Ha, I wisk you good luck with that :-) Best regards Antoine. _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/KBD7XG5QPRQRP52FVPAFLZ3G6PSPPVYE/ Code of Conduct: http://python.org/psf/codeofconduct/