X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FFileCache.pm;h=8e1fe446a52df51ba31dd4da57fd8740823dd111;hb=2c227d667bcf910e7fef2feea02fec7046f3cb13;hp=2386532cb0c9e8e45af34bf440ea39fc9d5a8edf;hpb=ba1df86b1a3459282f6a56ab4c803db5348d7a47;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/FileCache.pm b/lib/FileCache.pm index 2386532..8e1fe44 100644 --- a/lib/FileCache.pm +++ b/lib/FileCache.pm @@ -72,6 +72,7 @@ unless you terminated before repeatedly calling cacheout. require 5.006; use Carp; +use Config; use strict; no strict 'refs'; # These are not C for legacy reasons. @@ -88,7 +89,9 @@ sub import { *{$pkg.'::close'} = \&cacheout_close; # Reap our children - @{"$pkg\::SIG"}{'CLD', 'CHLD', 'PIPE'} = ('IGNORE')x3; + ${"$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};