This was my test code:
#!/usr/bin/perl
use strict;
use warnings;
$SIG{ALRM} = sub {
print "Alarming!\n";
};
kill 'ALRM', $$;
print "Not alarming\n";
(The quotes around 'ALRM' required for strict).
I don't have Strawberry Perl, but I tried it on ActiveState Perl 5.10.1 and got the same result, i.e. no output. I tried it on 5.10.0 on Cygwin and 5.8.8 on CentOS(Linux) and it worked correctly, i.e.
Alarming!
Not alarming
On Windows and ActiveState perl, tracing shows that it does exit on the
kill. I tried the same with an INT signal and that did not work either, however the symptoms were different. It did not execute the signal handler but it did not crash either.
The ActiveState documentation says that
alarm is not supported and signals are not properly supported anyhow. It's a Windows thing, but neither implementation should just drop-out without so much as a 'sorry'. The code is perfectly legal, if a bit of an edge case.