Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #98 from atotic/master

Sample fix for #91: 'daemons' gem steals HUP signal
  • Loading branch information...
commit 23dc62cf676c77be5529217e1fcf65e162c8576a 2 parents eff1a88 + d8b7af0
@macournoyer authored
Showing with 7 additions and 0 deletions.
  1. +2 −0  lib/thin/daemonizing.rb
  2. +5 −0 lib/thin/server.rb
View
2  lib/thin/daemonizing.rb
@@ -53,6 +53,8 @@ def daemonize
Dir.chdir(pwd)
write_pid_file
+
+ self.after_daemonize if self.respond_to? :after_daemonize
at_exit do
log ">> Exiting!"
View
5 lib/thin/server.rb
@@ -208,6 +208,11 @@ def running?
@backend.running?
end
+ # deamonizing kills our HUP signal, so we set them again
+ def after_daemonize
+ setup_signals
+ end
+
protected
# Register signals:
# * TERM & QUIT calls +stop+ to shutdown gracefully.
Please sign in to comment.
Something went wrong with that request. Please try again.