Help for this page

Select Code to Download


  1. or download this
       1. use POSIX ":sys_wait_h";
       2. my $loop      = 1;
    ...
      16.     kill( 9, $child );
      17. }
      18. else  {  print "no timeout\n";  }
    
  2. or download this
       1. my $loop     = 1;
       2. my $iterator = 1;
    ...
       5.     sleep( 1 );
       6.     print "$iterator($$)...\n";
       7. }
    
  3. or download this
       1. local $SIG{ALRM} = sub { die "alarm\n" };       # NB \n required
       2. alarm 10;
    ...
      10.     exec( "ratlperl count.pl $x" );
      11.     exit( 0 );
      12. }