Message146560
| Author |
neologix |
| Recipients |
neologix, vilya |
| Date |
2011年10月28日.14:01:06 |
| SpamBayes Score |
0.0005876439 |
| Marked as misclassified |
No |
| Message-id |
<1319810467.76.0.418658140835.issue13285@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> So it's impossible to reliably save and restore signal handlers through
> python when they can also be changed outside the python interpreter.
signal.getsignal() or signal.signal() return the current/previous handler as a Python function. How could it return a reference to a native (i.e. C) signal handler?
While we could in theory return it as a magic cookie (i.e. the handler's address as returned by sigaction/signal) that can just be passed back to signal.signal(), it would be a bad idea: if the user passes an invalid address, the process will crash when the signal is received. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2011年10月28日 14:01:07 | neologix | set | recipients:
+ neologix, vilya |
| 2011年10月28日 14:01:07 | neologix | set | messageid: <1319810467.76.0.418658140835.issue13285@psf.upfronthosting.co.za> |
| 2011年10月28日 14:01:07 | neologix | link | issue13285 messages |
| 2011年10月28日 14:01:07 | neologix | create |
|