diff --git a/lib/fluent/supervisor.rb b/lib/fluent/supervisor.rb index c4bdcaef0e..c3d3be713e 100644 --- a/lib/fluent/supervisor.rb +++ b/lib/fluent/supervisor.rb @@ -163,18 +163,22 @@ def supervisor_sigusr1_handler log.reopen! end - if pid = config[:worker_pid] - Process.kill(:USR1, pid) - # don't rescue Erro::ESRSH here (invalid status) + if config[:worker_pid] + config[:worker_pid].each do |pid| + Process.kill(:USR1, pid) + # don't rescue Erro::ESRSH here (invalid status) + end end end def kill_worker - if pid = config[:worker_pid] - if Fluent.windows? - Process.kill :KILL, pid - else - Process.kill :TERM, pid + if config[:worker_pid] + config[:worker_pid].each do |pid| + if Fluent.windows? + Process.kill :KILL, pid + else + Process.kill :TERM, pid + end end end end @@ -198,7 +202,7 @@ def spawn(process_manager) end def after_start - config[:worker_pid] = @pm.pid + (config[:worker_pid] ||= []).push(@pm.pid) end end