From 6dac783be23e36e5c11e4b14e8da6a81616ed0ed Mon Sep 17 00:00:00 2001 From: Masahiro Nakagawa Date: Tue, 5 Sep 2017 16:35:09 +0900 Subject: [PATCH] supervisor: Clear previous worker pids when receives kill signals. ref #1674 --- lib/fluent/supervisor.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/fluent/supervisor.rb b/lib/fluent/supervisor.rb index 750bd1efb7..ac2c249b28 100644 --- a/lib/fluent/supervisor.rb +++ b/lib/fluent/supervisor.rb @@ -173,7 +173,9 @@ def supervisor_sigusr1_handler def kill_worker if config[:worker_pid] - config[:worker_pid].each do |pid| + pids = config[:worker_pid].clone + config[:worker_pid].clear + pids.each do |pid| if Fluent.windows? Process.kill :KILL, pid else