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 benjamin.peterson, exarkun, gregory.p.smith, loewis, marcin.bachry, pitrou, schmichael, spiv, tseaver, vstinner
Date 2011-04-20.00:22:29
SpamBayes Score 2.732915e-10
Marked as misclassified No
Message-id <1303258951.17.0.709161809992.issue8407@psf.upfronthosting.co.za>
In-reply-to
Content
signal_pthread_sigmask.patch:
 - add signal.pthread_sigmask() function with doc and tests
 - add SIG_BLOCK, SIG_UNBLOCK, SIG_SETMASK constants
 - fix #11859: fix tests of test_io using threads and an alarm: use pthread_sigmask() to ensure that only the main thread receives the SIGALRM signal

The code is based on the last version of python-signalfd:
https://code.launchpad.net/~exarkun/python-signalfd/trunk

Changes between python-signalfd and my patch:
 - rename "sigprocmask" function to "pthread_sigmask"
 - I added an unit test and the doc
 - catch PyIter_Next() error
 - set signum variable (the result of PyLong_AsLong) type to long (instead of int) and check its value (0 < signum < NSIG)
 - I adapted the code to my coding style :-)

I will work on a similar patch for signalfd() after the pthread_sigmask() patch is accepted.
History
Date User Action Args
2011-04-20 00:22:31vstinnersetrecipients: + vstinner, loewis, gregory.p.smith, spiv, exarkun, tseaver, pitrou, benjamin.peterson, marcin.bachry, schmichael
2011-04-20 00:22:31vstinnersetmessageid: <1303258951.17.0.709161809992.issue8407@psf.upfronthosting.co.za>
2011-04-20 00:22:30vstinnerlinkissue8407 messages
2011-04-20 00:22:30vstinnercreate