Message285831
| Author | takluyver |
|---|---|
| Recipients | flox, martin.panter, neologix, petri.lehtinen, pitrou, rpcope1, takluyver, vilya, vstinner |
| Date | 2017-01-19.18:49:49 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1484851789.77.0.767448156201.issue13285@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
I'd like to make the case for a fix in the code again. Our use case is, I believe, the same as Vilya's. We want to temporarily set a signal handler from Python and then restore the previous handler. This is fairly straightforward for Python handler functions, and SIG_DFL and SIG_IGN, but it breaks if anything has set a C level signal handler. The opaque wrapper object is a solution that had occurred to me too. Another option would be a context manager implemented in C (I assume context managers can be written in C) which can set one or more signal handlers on entry, and restore them on exit. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2017-01-19 18:49:50 | takluyver | set | recipients: + takluyver, pitrou, vstinner, vilya, flox, neologix, petri.lehtinen, martin.panter, rpcope1 |
| 2017-01-19 18:49:49 | takluyver | set | messageid: <1484851789.77.0.767448156201.issue13285@psf.upfronthosting.co.za> |
| 2017-01-19 18:49:49 | takluyver | link | issue13285 messages |
| 2017-01-19 18:49:49 | takluyver | create | |