mirror of
https://github.com/fluent/fluentd-ui.git
synced 2026-05-05 10:56:11 +02:00
Ensure exit status code for detached_command method result
This commit is contained in:
parent
f80ab8a69a
commit
afc6cca460
@ -133,11 +133,12 @@ class Fluentd
|
||||
end
|
||||
|
||||
def detached_command(cmd)
|
||||
Bundler.with_clean_env do
|
||||
thread = Bundler.with_clean_env do
|
||||
pid = spawn(cmd)
|
||||
Process.detach(pid)
|
||||
end
|
||||
sleep 1 # NOTE/FIXME: too early return will be caused incorrect status report, "sleep 1" is a adhoc hack
|
||||
thread.join
|
||||
thread.value.exitstatus
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user