* [PATCH 2/2] git: drop the deleted err_c file
2019-06-01 3:37 4% [PATCH 0/2] git: a few minor cleanup tweaks to daemons Eric Wong
@ 2019-06-01 3:37 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2019-06-01 3:37 UTC (permalink / raw)
To: meta
No reason to leave that (usually) empty file open after killing off
"cat-file --batch-check". This wasn't an unbound leak, though,
as respawning the --batch-check process would've clobbered the
old err_c file.
---
lib/PublicInbox/Git.pm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/PublicInbox/Git.pm b/lib/PublicInbox/Git.pm
index 9a38d7c..9014e02 100644
--- a/lib/PublicInbox/Git.pm
+++ b/lib/PublicInbox/Git.pm
@@ -211,9 +211,10 @@ sub check {
}
sub _destroy {
- my ($self, $in, $out, $pid) = @_;
+ my ($self, $in, $out, $pid, $err) = @_;
my $p = delete $self->{$pid} or return;
delete @$self{($in, $out)};
+ delete $self->{$err} if $err; # `err_c'
waitpid $p, 0;
}
@@ -243,7 +244,7 @@ sub qx {
sub cleanup {
my ($self) = @_;
_destroy($self, qw(in out pid));
- _destroy($self, qw(in_c out_c pid_c));
+ _destroy($self, qw(in_c out_c pid_c err_c));
!!($self->{pid} || $self->{pid_c});
}
--
EW
^ permalink raw reply related [relevance 7%]
* [PATCH 0/2] git: a few minor cleanup tweaks to daemons
@ 2019-06-01 3:37 4% Eric Wong
2019-06-01 3:37 7% ` [PATCH 2/2] git: drop the deleted err_c file Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2019-06-01 3:37 UTC (permalink / raw)
To: meta
These probably don't affect anybody running servers atm, as I'm
probably the most hardware-deficient of public-inbox admins out
there...
Eric Wong (2):
git: unconditional expiry
git: drop the deleted err_c file
lib/PublicInbox/Git.pm | 21 ++++++---------------
lib/PublicInbox/Inbox.pm | 5 ++---
t/git.t | 3 +--
3 files changed, 9 insertions(+), 20 deletions(-)
--
EW
^ permalink raw reply [relevance 4%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2019-06-01 3:37 4% [PATCH 0/2] git: a few minor cleanup tweaks to daemons Eric Wong
2019-06-01 3:37 7% ` [PATCH 2/2] git: drop the deleted err_c file Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).