Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
The above code causes segmentation fault. To hand the segmentation fault i added a signal handle below.The code is shown below#!/usr/local/perl/bin/perl -w $| = 1; push @$x, abc(); sub abc { $x = 1; }
The script is able to catch the SEGV signal , but the script doest not exit. I did a truss on the process and think it goes in a infinite loop.#!/usr/local/perl/bin/perl -w $| = 1; push @$x, abc(); sub abc { $x = 1; } $SIG{'SEGV'} = '_my_sig_handler'; sub _my_sig_handler{ print "here"; exit(1); }
Could you help here ??
|
|---|