Help for this page

Select Code to Download


  1. or download this
    foreach $item ( @array ) {
        if( $pid = fork ) {
            print "Forking off to $pid\n";
    ...
            die "Can't fork: $!";
        }
    }
    
  2. or download this
    sub REAPER {
        my $waitedpid = wait;
        $SIG{CHLD} = \&REAPER;
    }
    
  3. or download this
        if( $pid = fork ) {
            print "Forking off to $pid\n";
    
  4. or download this
        if( $pid = fork ) {
            $SIG{CHLD} = \&REAPER;
            print "Forking off to $pid\n";