+
+ close $uswrite or die $!;
+ close $usread or die $!;
+
+ foreach my $ch (@children) {
+ $!=0; waitpid($ch->{Pid}, 0) == $ch->{Pid} or
+ die "$ch->{Pid} $ch->{Exe} $!";
+ $ch->{St} = $?;
+ }
+
+ $after_hook->();
+
+ foreach my $ch (@children) {
+ if (!filter_st_isok($ch)) {
+ die "update-xfonts-traditional:".
+ " $ch->{Exe} [$ch->{Pid}] for $what".
+ " failed $ch->{St}".
+ " (".(join ' ', keys %{ $ch->{SigOK} })." ok)\n";
+ }
+ }
+}
+
+sub processpcfgz ($$$$) {
+ my ($inpcfgz,$outpcfgz,$logfh,$what) = @_;
+ print $reportfh "processing $inpcfgz to $outpcfgz\n" if $verbose>=2;
+ my $input = new IO::File $inpcfgz, '<' or die "$inpcfgz $!";
+ my $output = new IO::File $outpcfgz, '>' or die "$outpcfgz $!";
+
+ my $r;
+ process_filter(\$r, $input, $output, $inpcfgz, $logfh,
+ [
+ ['gunzip'], ['pcf2bdf'], [$bdfnorm],
+ [],
+ ['bdftopcf'],['',qw(gzip -1 -n)]
+ ],
+ [qw(gunzip)],
+ # ... we never care if pcf2bdf didn't want all the data
+ sub {
+ if ($tolerate_bad_fonts &&
+ $r eq 'no bdf data' &&
+ filter_st_isok($ch{'gunzip'}) &&
+ ($ch{'pcf2bdf'}{St} & ~128) == 6)
+ {
+ $r = "pcf2bdf failed ($ch{'pcf2bdf'}{St})";
+ print STDERR "warning: $r: skipping $inpcfgz\n";
+ $ch{'pcf2bdf'}{SigOK}{6} = 1;
+ }
+ });