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 Zhiping.Deng, vstinner
Date 2011-05-31.14:42:52
SpamBayes Score 9.8496974e-05
Marked as misclassified No
Message-id <>
Extract of manpage signal(7):

"The  following  interfaces  are never restarted after being interrupted by a signal handler, regardless of the use of SA_RESTART; they always fail with the error EINTR when interrupted by a signal handler:
 * ...
 * File descriptor multiplexing interfaces: epoll_wait(2), epoll_pwait(2), poll(2), ppoll(2), select(2), and pselect(2)."

Consider siginterrupt(signal, False) as a "best-effort" trick... which doesn't work with select().

If you don't want select() to be interrupted by SIGINT, use:

pthread_sigmask(SIG_BLOCK, [SIGINT]);
pthread_sigmask(SIG_UNBLOCK, [SIGINT])


pselect(...., [SIGINT])

pselect() is atomic, whereas pthread_sigmask+select is not.

I added recently pthread_sigmask() to the signal module in Python 3.3.

pselect() is not exposed in Python currently. We may add it if it's needed.


If you really don't care of SIGINT, you can also ignore it completly using signal(SIGINT, SIG_IGN).
Date User Action Args
2011-05-31 14:42:56vstinnersetrecipients: + vstinner, Zhiping.Deng
2011-05-31 14:42:56vstinnersetmessageid: <>
2011-05-31 14:42:53vstinnerlinkissue12224 messages
2011-05-31 14:42:52vstinnercreate