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 vstinner
Recipients Christophe Simonis, Yaniv.Aknin, bda, exarkun, gregory.p.smith, kchen, neologix, nvetoshkin, pitrou, spiv, vstinner
Date 2011-05-31.14:55:25
SpamBayes Score 5.085541e-08
Marked as misclassified No
Message-id <>
Using signalfd() (require Linux 2.6.22+), specified signals are written in a file and don't interrupt system calls (select). Bonus: we can wait for a signal using select!

Using pthread_sigmask(), you can also block signals before calling select, but it's not atomic. Or you can use pselect() which is pthread_sigmask()+select() in an atomic fashion.

pthread_sigmask() is already in Python 3.3, I plan to add signalfd() in a few weeks into Python 3.3. For pselect(), I don't know if we need it.

pthread_sigmask() is available on most POSIX systems, not on Windows. Can select() be interrupted by CTRL+c on Windows?

I don't say that we should not restart manually select() on EINTR, just that better solutions do exist today.
Date User Action Args
2011-05-31 14:55:26vstinnersetrecipients: + vstinner, gregory.p.smith, spiv, exarkun, pitrou, Christophe Simonis, nvetoshkin, neologix, Yaniv.Aknin, bda, kchen
2011-05-31 14:55:26vstinnersetmessageid: <>
2011-05-31 14:55:26vstinnerlinkissue7978 messages
2011-05-31 14:55:26vstinnercreate