Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix Thin not obeying to QUIT / TERM signal under Ruby 1.9 [Nate Wiger] [

#123 state:resolved]
  • Loading branch information...
commit 99d9ece3feac477871827fc2e41135a79b190814 1 parent 08cf2c0
Marc-André Cournoyer macournoyer authored
Showing with 7 additions and 1 deletion.
  1. +3 −0  CHANGELOG
  2. +4 −1 lib/thin/daemonizing.rb
3  CHANGELOG
View
@@ -1,3 +1,6 @@
+== 1.2.6
+ * Fix Thin not obeying to QUIT / TERM signal under Ruby 1.9 [Nate Wiger] [#123 state:resolved]
+
== 1.2.5 This Is Not A Web Server
* Add rolling restart support (--onebyone option) [sikachu]
* Force external_encoding of request's body to ASCII_8BIT [jeremyz]
5 lib/thin/daemonizing.rb
View
@@ -47,7 +47,10 @@ def daemonize
write_pid_file
- trap('HUP') { restart }
+ trap('HUP') { restart }
+ trap('TERM') { log ">> Received TERM signal (PID: #{$$})"; exit }
+ trap('QUIT') { log ">> Received QUIT signal (PID: #{$$})"; exit }
+
at_exit do
log ">> Exiting!"
remove_pid_file
Please sign in to comment.
Something went wrong with that request. Please try again.