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 <rep...@bugs.python.org>
<http://bugs.python.org/issue18869>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to