[issue10311] Signal handlers must preserve errno

Antoine Pitrou report at bugs.python.org
Thu Nov 4 15:50:08 CET 2010

Antoine Pitrou <pitrou at free.fr> added the comment:

> ["this" = only saving/restoring errno when needed]
> True, but practically nothing is officially safe to do in signal
> handlers, so it's good to avoid code which can be avoided there.
> If one can be bothered to, that is.

I think it is extremely unlikely that mutating errno in a signal handler is unsafe (after all, the library functions called from that handler can mutate errno too: that's the whole point of the patch IIUC). Adding some configure machinery for this seems unwarranted to me.


Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list