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

allow app to also handle sighup and call super #1527

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 5 additions & 7 deletions lib/puma/launcher.rb
Expand Up @@ -414,16 +414,14 @@ def setup_signals
log "*** SIGINT not implemented, signal based gracefully stopping unavailable!"
end

begin
Signal.trap "SIGHUP" do
if @runner.redirected_io?
if @runner.redirected_io?
begin
Signal.trap "SIGHUP" do
@runner.redirect_io
else
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@grosser What I meant was you eliminated this branch of code, and I don't understand why.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was basically thinking "if you send SIGHUP to a server that does not have any reload mechanic then wtf are you doing" ... but maybe it's valid usecase :(

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it was important to #1377?

stop
end
rescue Exception
log "*** SIGHUP not implemented, signal based logs reopening unavailable!"
end
rescue Exception
log "*** SIGHUP not implemented, signal based logs reopening unavailable!"
end
end
end
Expand Down