[issue10311] Signal handlers must preserve errno
Hallvard B Furuseth
report at bugs.python.org
Fri Nov 5 10:49:58 CET 2010
Hallvard B Furuseth <h.b.furuseth at usit.uio.no> added the comment:
Antoine Pitrou writes:
> By the way, I'd like to clear out a potential misunderstanding: the
> function you are patching doesn't call Python signal handlers in itself
> (those registered using signal.signal()). (...)
Good point - I'm talking C signal handlers, not Python signal handlers.
> If you want to save errno around Python signal handlers
> themselves, PyErr_CheckSignals must be patched as well.
Probably not. I don't know Python's errno conventions, if any, but
it's usually a bug to use errno at any distance from the error. The C
code near the error can save errno if it wants it later. It can't do
that around C signal handlers, since those can get called anywhere.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10311>
_______________________________________
More information about the Python-bugs-list
mailing list