in reply to Re: segmentation fault for perl
in thread segmentation fault for perl

My os is solaris 10. Stating the problem again. I am invoking the script x.pl from y.pl as system(x.pl); my $exit_status = $? >> 8; I am capturing the status always. It sometimes happen that x.pl is able to execute successfuly (it updates a database before exiting). But capturing the error status in y.pl shows the system(x.pl) has a exit status of segmentation fault.

Replies are listed 'Best First'.
Re^3: segmentation fault for perl
by ikegami (Patriarch) on Jul 06, 2009 at 16:49 UTC

    You can't find out if a segfault occured by looking at $? >> 8. Do you mean $? & 127? What's the value of $??

    In any case, if a segfault did occur, I can't see how Perl was responsible.