Message196400
| Author |
pitrou |
| Recipients |
neologix, pitrou, r.david.murray, vstinner |
| Date |
2013年08月28日.18:26:52 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1377714404.2501.1.camel@fsol> |
| In-reply-to |
<CAH_1eM145_gEos1-6rmY6nXdXTURXfOE1JLueQm45Hyuy3eZ5A@mail.gmail.com> |
| Content |
> > Or perhaps we could enhance the signal module so that getsignal() return something (i.e. a specific object) which can restore the C signal handler. That would be better than special-casing faulthandler, IMHO.
>
> Yes, I thought about that, see http://bugs.python.org/msg146560
> The only problem I saw at that time is that we must make sure that the
> object is indeed valid, otherwise the signal handler can jump to an
> invalid address, and boom.
Well, to make sure the object is valid, you can just ensure instances
can't be created from Python (for example, make tp_new raise an error),
and that the internal state can't be mutated. |
|