The signal module has a wakefd feature which calls write(fd) in a signal handler, but the signal handler replaces errno without saving/restoring it. See "Practice 4" in this article: http://www.ibm.com/developerworks/linux/library/l-reent/index.html Attached patch fixes the issue for Python 3.5. The bug should be fixed in Python 2.7, 3.4 and 3.5.
Ooops, I looked at the wrong function. signal_handler() saves/restores errno. trip_signal() is a function called by signal_handler(). The code is correct.
History
Date
User
Action
Args
2022-04-11 14:58:06
admin
set
github: 66214
2014-07-20 10:13:38
vstinner
set
status: open -> closedresolution: not a bugmessages: +