Permalink
Browse files

Merge pull request #98 from atotic/master

Sample fix for #91: 'daemons' gem steals HUP signal
  • Loading branch information...
macournoyer committed May 29, 2012
2 parents eff1a88 + d8b7af0 commit 23dc62cf676c77be5529217e1fcf65e162c8576a
Showing with 7 additions and 0 deletions.
  1. +2 −0 lib/thin/daemonizing.rb
  2. +5 −0 lib/thin/server.rb
View
@@ -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
@@ -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.

0 comments on commit 23dc62c

Please sign in to comment.