Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix regression about RPC /api/config.reload #1093

Merged
merged 1 commit into from
Jul 20, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions example/in_forward.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<system>
rpc_endpoint 0.0.0.0:24444
</system>

<source>
@type forward
</source>
Expand Down
11 changes: 10 additions & 1 deletion lib/fluent/supervisor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,21 @@ def stop_rpc_server
end

def install_supervisor_signal_handlers
trap :HUP do
$log.debug "fluentd supervisor process get SIGHUP"
supervisor_sighup_handler
end unless Fluent.windows?

trap :USR1 do
$log.debug "fluentd supervisor process get SIGUSR1"
supervisor_sigusr1_handler
end unless Fluent.windows?
end

def supervisor_sighup_handler
kill_worker
end

def supervisor_sigusr1_handler
if log = config[:logger_initializer]
log.reopen!
Expand All @@ -136,7 +145,7 @@ def kill_worker
if Fluent.windows?
Process.kill :KILL, pid
else
Process.kill :INT, pid
Process.kill :TERM, pid
end
end
end
Expand Down