Catching a SIGSEGV signal on an import

Nobody nobody at nowhere.com
Thu Sep 9 17:20:36 EDT 2010


On Thu, 09 Sep 2010 05:23:14 -0700, Ryan wrote:

> But, since SIGSEGV is asynchronous

SIGSEGV is almost always synchronous.

> In general, is there anyway to catch a  SIGSEGV on import?

No. If SIGSEGV is raised, it often indicates that memory has been
corrupted. At that point, you can't assume that the Python runtime is
still functional.

In general, even attempting to catch it is a bad idea. Particularly in a
high-level language; getting it right in C is hard enough.




More information about the Python-list mailing list