I have a problem with signal handlers not working.
I have a long 1000 line code and somehow this code for signal handling is not working:
$SIG{INT} = \&interrupt;
sub interrupt {
print STDERR "Caught a control c!\n";
exit; # or just about anything else you'd want to do
}
Any reasons why?
I tested it on a short sample test program and it works. What can be the reason in my program not to work?
Thanks in Advance.