Help for this page

Select Code to Download


  1. or download this
    sub childDone {
        # Resource is freed up so place it back in the queue to be used fo
    +r future toasts.
    ...
          alarm 0;        # send SIGALRM so sleep() wakes up
    };
    $SIG{CHLD} = \&childDone;
    
  2. or download this
    @resources = {cdrw0 cdrw1 cdrw2}
    my $chld;
    ...
        last unless @thisround;
    }
    sleep until keys %jobs == 0;    # wait for all jobs
    
  3. or download this
         my $pid = open (SAFEKID, "-|");
         if ( $pid == 0 ) {
    ...
             my @output = <SAFEKID>;
             close SAFEKID;
         }