[issue5315] signal handler never gets called
Devin Jeanpierre
report at bugs.python.org
Mon May 25 07:25:12 CEST 2015
Devin Jeanpierre added the comment:
Agree with Charles-François's second explanation. This makes it very hard to reliably handle signals -- basically everyone has to remember to use set_wakeup_fd, and most people don't. For example, gunicorn is likely vulnerable to this because it doesn't use set_wakeup_fd. I suspect most code using select + signals is wrong.
I've attached a patch which fixes the issue for select(), but not any other functions. If it's considered a good patch, I can work on the rest of the functions in the select module. (Also, tests for the details of the behavior.)
Also the patch is pretty hokey, so I'd appreciate feedback if it's going to go in. :)
----------
keywords: +patch
nosy: +Devin Jeanpierre
Added file: http://bugs.python.org/file39489/select_select.diff
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5315>
_______________________________________
More information about the Python-bugs-list
mailing list