Message134111
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. |
|
Date |
User |
Action |
Args |
2011-04-20 00:22:31 | vstinner | set | recipients:
+ vstinner, loewis, gregory.p.smith, spiv, exarkun, tseaver, pitrou, benjamin.peterson, marcin.bachry, schmichael |
2011-04-20 00:22:31 | vstinner | set | messageid: <1303258951.17.0.709161809992.issue8407@psf.upfronthosting.co.za> |
2011-04-20 00:22:30 | vstinner | link | issue8407 messages |
2011-04-20 00:22:30 | vstinner | create | |
|