Help for this page

Select Code to Download


  1. or download this
    #!/opt/perl/bin/perl
    use strict;
    ...
    {
            local $SIG{ALRM} = sub { print "handler 3\n"; };
    }
    
  2. 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)                           = ?
    
  3. 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});
    }
    
  4. 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)                           = ?