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