Message134111
| 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. |
|