- or download this
#!/opt/perl/bin/perl
use strict;
...
{
local $SIG{ALRM} = sub { print "handler 3\n"; };
}
- or download this
write(1, "set handler 1\n", 14set handler 1
) = 14
...
rt_sigaction(SIGALRM, {0x80a3330, [], 0}, {0x80a3330, [], 0}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
exit_group(0) = ?
- or download this
#!/opt/perl/bin/perl
use strict;
...
$SIG{ALRM} = sub { print "handler 3\n"; };
print "\$SIG{ALRM} is now set locally: " . Dumper($SIG{ALRM});
}
- or download this
write(1, "set handler 1\n", 14set handler 1
) = 14
...
rt_sigaction(SIGALRM, {0x80a3330, [], 0}, {0x80a3330, [], 0}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
exit_group(0) = ?