Catching a segfault in a Python library
Paul Rubin
http
Sat Nov 24 00:05:23 EST 2007
Donn Ingle <donn.ingle at gmail.com> writes:
> > Run your app under a debugger and figure out what is making it crash.
> Already done, the code within PIL is causing the crash. It gets ugly and out
> of my remit. It's a freetype/Pil thing and I simply want to a way to catch
> it when it happens.
> Since a segfault ends the process, I am asking about "wrappers" around code
> to catch a segfault.
Well I think you should actually debug it, or at least reproduce it
and send a bug report to the PIL folks, but anyway you can use
os.wait() to get the exit status and recognize the seg fault.
More information about the Python-list
mailing list