diff options
author | Alan Burlison <Alan.Burlison@uk.sun.com> | 2004-05-28 13:27:06 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2004-06-01 15:26:59 +0000 |
commit | 533968fe05e828818d78b731fade41cae15a5f2a (patch) | |
tree | 741e615d18195053bcf748f9a65acc4277028361 /lib | |
parent | 27a8011f06c478a310bc7e1bbe434c4e3644afde (diff) | |
download | perl-533968fe05e828818d78b731fade41cae15a5f2a.tar.gz |
Remove redundant %SIG assignments from FileCache
Message-ID: <40B7220A.4040305@sun.com>
p4raw-id: //depot/perl@22888
Diffstat (limited to 'lib')
-rw-r--r-- | lib/FileCache.pm | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/lib/FileCache.pm b/lib/FileCache.pm index ecf7ed3767..2db9cbe611 100644 --- a/lib/FileCache.pm +++ b/lib/FileCache.pm @@ -1,6 +1,6 @@ package FileCache; -our $VERSION = 1.04; +our $VERSION = '1.04_01'; =head1 NAME @@ -59,18 +59,21 @@ do not do so if you are calling C<FileCache::cacheout> from a package other than which it was imported, or with another module which overrides C<close>. If you must, use C<FileCache::cacheout_close>. +Although FileCache can be used with piped opens ('-|' or '|-') doing so is +strongly discouraged. If FileCache finds it necessary to close and then reopen +a pipe, the command at the far end of the pipe will be reexecuted - the results +of performing IO on FileCache'd pipes is unlikely to be what you expect. The +ability to use FileCache on pipes may be removed in a future release. + +FileCache does not store the current file offset if it finds it necessary to +close a file. When the file is reopened, the offset will be as specified by the +original C<open> file mode. This could be construed to be a bug. + =head1 BUGS F<sys/param.h> lies with its C<NOFILE> define on some systems, so you may have to set I<maxopen> yourself. -=head1 NOTES - -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 require 5.006; @@ -111,11 +114,6 @@ sub import { # Open in their package. sub cacheout_open { - # Reap our children - local $SIG{CLD} ||= 'IGNORE'if $Config{sig_name} =~ /\bCLD\b/; - local $SIG{CHLD} ||= 'IGNORE'if $Config{sig_name} =~ /\bCHLD\b/; - local $SIG{PIPE} ||= 'IGNORE'if $Config{sig_name} =~ /\bPIPE\b/; - return open(*{caller(1) . '::' . $_[1]}, $_[0], $_[1]) && $_[1]; } |