Okay, the fixed packagae is at ftp://pthbb.org/pub/pm/FileCache/1.04.tgz The diff is =begin --- FileCache.pm Sun Jun 22 13:44:26 2003 +++ FileCache-1.04/FileCache.pm Fri Apr 16 14:49:05 2004 @@ -1,6 +1,6 @@ package FileCache; -our $VERSION = 1.03; +our $VERSION = 1.04; =head1 NAME @@ -46,6 +46,9 @@ namely; C<< '>' >>, C<< '+>' >>, C<< '<' >>, C<< '<+' >>, C<<< '>>' >>>, C< '|-' > and C< '-|' > +To pass supplemental arguments to a program opened with C< '|-' > or C< '-|' > +append them to the command string as you would system EXPR. + Returns EXPR on success for convenience. You may neglect the return value and manipulate EXPR as the filehandle directly if you prefer. @@ -63,10 +66,10 @@ =head1 NOTES -FileCache installs signal handlers for CHLD (a.k.a. CLD) and PIPE in the -calling package to handle deceased children from 2-arg C<cacheout> with C<'|-'> -or C<'-|'> I<expediently>. The children would otherwise be reaped eventually, -unless you terminated before repeatedly calling cacheout. +FileCache installs localized signal handlers for CHLD (a.k.a. CLD) and PIPE +to handle deceased children from 2-arg C<cacheout> with C<'|-'> or C<'-|'> +I<expediently>. The children would otherwise be reaped eventually, unless you +terminated before repeatedly calling cacheout. =cut @@ -88,11 +91,6 @@ *{$pkg.'::cacheout'} = \&cacheout; *{$pkg.'::close'} = \&cacheout_close; - # Reap our children - ${"$pkg\::SIG"}{'CLD'} = 'IGNORE' if $Config{sig_name} =~ /\bCLD\b/; - ${"$pkg\::SIG"}{'CHLD'} = 'IGNORE' if $Config{sig_name} =~ /\bCHLD\b/; - ${"$pkg\::SIG"}{'PIPE'} = 'IGNORE' if $Config{sig_name} =~ /\bPIPE\b/; - # Truth is okay here because setting maxopen to 0 would be bad return $cacheout_maxopen = $args{maxopen} if $args{maxopen}; foreach my $param ( '/usr/include/sys/param.h' ){ @@ -113,6 +111,11 @@ # Open in their package. sub cacheout_open { + # Reap our children + local $SIG{CLD} ||= 'IGNORE'if $Config{sig_name} =~ /\bCHLD\b/; + local $SIG{CHLD} ||= 'IGNORE'if $Config{sig_name} =~ /\bCLD\b/; + local $SIG{PIPE} ||= 'IGNORE'if $Config{sig_name} =~ /\bPIPE\b/; + return open(*{caller(1) . '::' . $_[1]}, $_[0], $_[1]) && $_[1]; } =end -- H4sICNoBwDoAA3NpZwA9jbsNwDAIRHumuC4NklvXTOD0KSJEnwU8fHz4Q8M9i3sGzkS7BBrm OkCTwsycb4S3DloZuMIYeXpLFqw5LaMhXC2ymhreVXNWMw9YGuAYdfmAbwomoPSyFJuFn2x8 Opr8bBBidccAAAA= -- MOTD on Sweetmorn, the 33rd of Discord, in the YOLD 3170: >Kick the baby.>>Don' kick tha baby...>Kick the baby!Thread Previous | Thread Next