Help for this page

Select Code to Download


  1. or download this
    
    #Start fork
    ...
        print "done with pid $tmp";
        }
    
  2. or download this
    $SIG{INT}=\&ctrl_c_handler;
    
    ...
    my $tmp = waitpid($child, 0);
    }
    }
    
  3. or download this
    my $t = threads->new (sub{
             local $SIG{'USR1'}=sub {threads->exit();};
    ...
          });
    
    my $result = $t->join();