This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Devin Jeanpierre
Recipients Devin Jeanpierre, Netto, amcnabb, georg.brandl, neologix, pitrou, pts, s7v7nislands, tim.peters
Date 2015-05-25.05:25:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1432531512.2.0.671066613974.issue5315@psf.upfronthosting.co.za>
In-reply-to
Content
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. :)
History
Date User Action Args
2015-05-25 05:25:12Devin Jeanpierresetrecipients: + Devin Jeanpierre, tim.peters, georg.brandl, pitrou, amcnabb, pts, s7v7nislands, neologix, Netto
2015-05-25 05:25:12Devin Jeanpierresetmessageid: <1432531512.2.0.671066613974.issue5315@psf.upfronthosting.co.za>
2015-05-25 05:25:12Devin Jeanpierrelinkissue5315 messages
2015-05-25 05:25:11Devin Jeanpierrecreate