+ my $logpath = "$fontdir/$logfile";
+ unlink "$logpath" or $!==&ENOENT or die "$logpath $!";
+ my $log = new IO::File $logpath, ">>" or die "$logpath $!";
+
+ if (!$wanted_parallel) {
+ $wanted_parallel = Sys::CPU::cpu_count();
+ printf $reportfh "parallelism: %d\n", $wanted_parallel if $verbose>=2;
+ }
+ $wanted_parallel = 1 if $wanted_parallel < 1;
+
+ our %inprogress;
+
+ my $await = sub {
+ my $child = wait;
+ die $! unless defined $child;
+ my $job = $inprogress{$child};
+ die $child unless $job;
+
+ my $dent = $job->{Dent};
+ my $outdent = $job->{Outdent};
+ my $stats = $job->{Stats};
+ if ($?==0) {
+ $updated++;
+ $outfiles{$outdent} |= 3;
+ } elsif ($?==2*256) {
+ } else {
+ die "update-xfonts-traditional: processing of".
+ " $fontdir/$dent [$child] failed ($?)\n";
+ }
+ $newdone->{$dent} = $stats;
+ $changed = 1;
+ delete $inprogress{$child};
+ };
+