Help for this page

Select Code to Download


  1. or download this
    kill INT => $pid;
    # which is the same as
    kill 'INT', $pid;
    
  2. or download this
    $SIG{INT} = sub { 
     # code executed on 'INT' signal here
    }; # <-- that semicolon isn't optional
    
  3. or download this
    {
      my $stop = 0;
    ...
    }
    # our old SIGINT handle is restored here, because we
    # left the old block.