Help for this page

Select Code to Download


  1. or download this
    for(my $i=0; $i< @hosts; $i++){
        $pm->start($hosts[$i]) and next;   
    ...
        $return_code = $? >> 8;
        $pm->finish($return_code);
    }
    
  2. or download this
    use POSIX qw( _exit );
    
    ...
        $return_code = $? >> 8;
        _exit($return_code);
    }
    
  3. or download this
    for my $host (@hosts) {
        $pm->start($host) and next;   
        exec(@some_command);
    }
    
  4. or download this
    for my $host (@hosts) {
        $pm->start($host) and next;   
    ...
        print(STDERR "exec failed: $!\n");
        _exit($!);
    }