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 to stop Fluentd worker process by Ctrl-C when --no-supervisor specified #1089

Merged
merged 1 commit into from
Jul 7, 2016
Merged
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
7 changes: 7 additions & 0 deletions lib/fluent/supervisor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,13 @@ def install_main_process_signal_handlers
# worker process SHOULD NOT do anything with SIGINT, SHOULD just ignore.
trap :INT do
$log.debug "fluentd main process get SIGINT"

# When Fluentd is launched without supervisor, worker should handle ctrl-c by itself
if @standalone_worker
@finished = true
$log.debug "getting start to shutdown main process"
Fluent::Engine.stop
end
end

trap :TERM do
Expand Down