[Israel.pm] catching segmentation faults and other crashes

Yona Shlomo yona at cs.technion.ac.il
Mon Nov 12 04:29:59 PST 2007


On Mon, 12 Nov 2007, Mikhael Goikhman wrote:

> If your program does exit(0) on success, then just check for non-zero $?
> to catch a failure. If the program may exit with something else and you
> don't want to consider it a failure, check for non-zero "$? & 127" to
> catch abnormal exit (like "kill -9" or other signal or "Out of memory").
> This should be portable enough.

Thanks.


-- 
Shlomo Yona
yona at cs.technion.ac.il
http://yeda.cs.technion.ac.il/~yona/



More information about the Perl mailing list