diff options
author | Eric Wong <e@80x24.org> | 2016-02-28 11:28:33 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-02-28 11:30:33 +0000 |
commit | 2ac2023fa416e31189708c355db8728abbd9ef2c (patch) | |
tree | 4d9eed94def3dfc7b6d7c0c5cb86bb734c84173c /lib/PublicInbox/SearchIdx.pm | |
parent | 8f090c1ff5e4eea068f20b30f1f79144aae936a3 (diff) | |
download | public-inbox-2ac2023fa416e31189708c355db8728abbd9ef2c.tar.gz |
We can rely on timely auto-destruction based on reference counting; reducing the chance of redundant close(2) calls which may hit the wront FD. We do care about certain close calls (e.g. writing to a buffered IO handle) if we require error-checking for write-integrity. In other cases, let things go out-of-scope so it can be freed automatically after use.
Diffstat (limited to 'lib/PublicInbox/SearchIdx.pm')
-rw-r--r-- | lib/PublicInbox/SearchIdx.pm | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/PublicInbox/SearchIdx.pm b/lib/PublicInbox/SearchIdx.pm index 1d0d926f..415decd1 100644 --- a/lib/PublicInbox/SearchIdx.pm +++ b/lib/PublicInbox/SearchIdx.pm @@ -348,7 +348,6 @@ sub rlog { $latest = $1; } } - close $log; $latest; } @@ -446,7 +445,6 @@ sub _read_git_config_perm { my @cmd = qw(config core.sharedRepository); my $fh = PublicInbox::Git->new($self->{git_dir})->popen(@cmd); my $perm = <$fh>; - close $fh; chomp $perm if defined $perm; $perm; } |