[issue18869] test suite: faulthandler signal handler is lost

Antoine Pitrou report at bugs.python.org
Wed Aug 28 20:26:52 CEST 2013


Antoine Pitrou added the comment:

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

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18869>
_______________________________________


More information about the Python-bugs-list mailing list