- 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;
- or download this
@resources = {cdrw0 cdrw1 cdrw2}
my $chld;
...
last unless @thisround;
}
sleep until keys %jobs == 0; # wait for all jobs
- or download this
my $pid = open (SAFEKID, "-|");
if ( $pid == 0 ) {
...
my @output = <SAFEKID>;
close SAFEKID;
}