diff options
author | Eric Wong <e@80x24.org> | 2020-12-20 06:30:15 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2020-12-20 20:39:14 +0000 |
commit | e77241850763dea9995381f3c0c7b354aa791cc0 (patch) | |
tree | 3b46b4f3e4c33718f3587293cccfd3e7a7342a00 /lib/PublicInbox/Daemon.pm | |
parent | df708a4f7c4d62ef685ccf9868c78ff2709c1f40 (diff) | |
download | public-inbox-e77241850763dea9995381f3c0c7b354aa791cc0.tar.gz |
The `kill' perl op takes multiple PIDs, so there's no need to iterate through the %pids hash.
Diffstat (limited to 'lib/PublicInbox/Daemon.pm')
-rw-r--r-- | lib/PublicInbox/Daemon.pm | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/PublicInbox/Daemon.pm b/lib/PublicInbox/Daemon.pm index eeac3bd2..1762be0b 100644 --- a/lib/PublicInbox/Daemon.pm +++ b/lib/PublicInbox/Daemon.pm @@ -419,11 +419,8 @@ sub upgrade { # $_[0] = signal name or number (unused) } sub kill_workers ($) { - my ($s) = @_; - - while (my ($pid, $id) = each %pids) { - kill $s, $pid; - } + my ($sig) = @_; + kill $sig, keys(%pids); } sub upgrade_aborted ($) { |