Help for this page

Select Code to Download


  1. or download this
      $pid=fork();
      exec("notepad");
      $SIG{INT}=\&handler;
      sub handler { kill 1,$pid; }
    
  2. or download this
      my $pid = fork() ;  die "fork failed '$!'" if !defined($pid) ;
    
    ...
      while ($r) { sleep(1) } ;
    
      print "And we're done\n" ;
    
  3. or download this
      use strict ; use warnings ;
    
    ...
      while ($run) { sleep(1) } ;
    
      print "And we're done\n" ;