Help for this page

Select Code to Download


  1. or download this
    while ($forked > 0) {
        print "[$forked] ";
        last if (waitpid(-1,0) == -1);
        sleep 1;
    }
    
  2. or download this
    #!/usr/bin/perl -w
    
    use strict;
    ...
        print "Finished child process $pid" . ($? ? " with exit $?" : "") 
    +. "\n";
        delete $kids{$pid};
    }