[Israel.pm] catching segmentation faults and other crashes

Tal Kelrich tal at musicgenome.com
Mon Nov 12 05:25:43 PST 2007


On Mon, 12 Nov 2007 14:13:37 +0200 (IST)
Yona Shlomo <yona at cs.technion.ac.il> wrote:

> On Mon, 12 Nov 2007, Mikhael Goikhman wrote:
> 
> >> $? didn't do the trick for me for some reason.
> >> I'll probe further and try to figure out why.
> >
> > Are you sure the program actually dumps core? With "limit
> > coredumpsize 0" in a shell (versus "limit coredumpsize unlimited"),
> > there is no core dump and the 7-th bit of $? is always zero (the
> > "&& 128" check), as expected. But even then, $? is not 0, also as
> > expected. On all unix systems I have.
> >
> 
> I actually don't care if there is a core dump or not.
> I just wanted to know that the tool crashed.
> 
> The fallback is not only to look for nonzero value of $? but
> I might get this triggered also when there is no crash...
> 

if(!WIFEXITED($?))
{
	#crashed!
}

-- 
Tal Kelrich
PGP fingerprint: 3EDF FCC5 60BB 4729 AB2F  CAE6 FEC1 9AAC 12B9 AA69
Key Available at: http://www.hasturkun.com/pub.txt
----
I have never understood the female capacity to avoid a direct answer to
any question.
		-- Spock, "This Side of Paradise", stardate 3417.3
----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://perl.org.il/pipermail/perl/attachments/20071112/e25063cc/attachment.pgp 


More information about the Perl mailing list