From 0e9088e0c762f64bcc9fa0bfcfec63799f2fb118 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 15 Nov 2023 01:04:56 +0000 Subject: lei: use -signal numbers for old Perl Unlike modern Perls, Perl 5.16.3 on CentOS doesn't accept negative string signals like "-TERM" . This only became a problem since commit b231d91f42d7 (treewide: enable warnings in all exec-ed processes) made our code stricter by enabling more warnings. In both cases, the kill is probably unnecessary and safe to remove since we can rely on closing sockets to drop processes. --- lib/PublicInbox/LEI.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/LEI.pm') diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm index 77acb5a1..69065ce7 100644 --- a/lib/PublicInbox/LEI.pm +++ b/lib/PublicInbox/LEI.pm @@ -474,7 +474,7 @@ my @WQ_KEYS = qw(lxs l2m ikw pmd wq1 lne v2w); # internal workers sub _drop_wq { my ($self) = @_; for my $wq (grep(defined, delete(@$self{@WQ_KEYS}))) { - $wq->wq_kill('-TERM'); + $wq->wq_kill(-POSIX::SIGTERM()); $wq->DESTROY; } } -- cgit v1.2.3-24-ge0c7