From 3894c29d99646fcd315ca6794b65e32547fcbae2 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 7 Feb 2021 08:51:45 +0000 Subject: lei add-external: handle interrupts with --mirror This also updates lei_xsearch to follow the same pattern for stopping curl(1) and tail(1) processes it spawns. --- lib/PublicInbox/OnDestroy.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/OnDestroy.pm') diff --git a/lib/PublicInbox/OnDestroy.pm b/lib/PublicInbox/OnDestroy.pm index 0ae4c4c9..615bc450 100644 --- a/lib/PublicInbox/OnDestroy.pm +++ b/lib/PublicInbox/OnDestroy.pm @@ -10,7 +10,7 @@ sub new { sub DESTROY { my ($cb, @args) = @{$_[0]}; - if (!ref($cb)) { + if (!ref($cb) && $cb) { my $pid = $cb; return if $pid != $$; $cb = shift @args; -- cgit v1.2.3-24-ge0c7