Prevent zombie processes from increasing

fixes #165

Before, in dashboard, clicking "Start" button creates a process as
zombie, but clicking "Stop" button doesn't kill it. This change prevents
it from becoming zombie.
This commit is contained in:
yoshihara 2015-04-01 14:58:22 +09:00
parent 41fd430323
commit 8f21c5f68c

View File

@ -67,7 +67,8 @@ class Fluentd
def actual_start
return unless validate_fluentd_options
Bundler.with_clean_env do
spawn("fluentd #{options_to_argv}")
pid = spawn("fluentd #{options_to_argv}")
Process.detach(pid)
end
wait_starting