Help for this page

Select Code to Download


  1. or download this
    sub reap_child {
       while ( (my $child = waitpid(-1,WHNOHANG)) > 0) {
    ...
          delete $CHILDREN{$child};
       }
    }
    
  2. or download this
    sub kill_children {
       kill TERM => keys %CHILDREN;
       sleep while %CHILDREN;
    }