New submission from Hallvard B Furuseth <h.b.furus...@usit.uio.no>: Signal handlers that can change errno, must restore it. I enclose a patch for <2.7, 3.2a3>/Modules/signalmodule.c which also rearranges the code to make this a bit easier.
The patch does if (errno != save_errno) errno = save_errno; instead of just errno = save_errno; in case it's less thread-safe to write than to read errno, which would not surprise me but may be pointless paranoia. I don't know what needs to be done on non-Unix systems, like Windows' WSAError stuff. ---------- components: Interpreter Core files: signalmodule-errno.diff keywords: patch messages: 120395 nosy: hfuru priority: normal severity: normal status: open title: Signal handlers must preserve errno type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file19488/signalmodule-errno.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10311> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com