S
Solo
I wrote the following code just to test the catch of Ctrl-C:
---------------
{
$SIG{'INT'} = \&cmd1;
print "Entering the loop \n\n";
while (1)
{
}
}
sub cmd1
{
my ($sig) = @_;
print "The Interrupt was caught: <$sig>\n";
exit (0);
}
---------------
{
$SIG{'INT'} = \&cmd1;
print "Entering the loop \n\n";
while (1)
{
}
}
sub cmd1
{
my ($sig) = @_;
print "The Interrupt was caught: <$sig>\n";
exit (0);
}