thin daemonized doesn't stop on macosx
Reported by Federico Galassi | April 9th, 2010 @ 12:51 PM
I am running macosx 10.6.3, ruby 1.9.1p376 (macports), thin
1.2.7.
Calling thin stop, when thin starts daemonized, does not close the
process. It outputs "Sending QUIT" until timeout kicks in and kills
the process. I tracked the whole thing and eventually figured out
child process does not inherit signal handlers. I can reproduce the
problem standalone. Looking at specific man pages doesn't help. It
looks to me that Process.fork and Process.setsid used by Daemonize
should not reset signal handlers not even under macosx. The only
documented call i found that reset them is execve. So, i can only
guess problem is on ruby side (or maybe macosx).
I quickly fixed it by making setup_signals public and calling it again just after daemonization in controller.rb
Thanks
Federico
Comments and changes to this ticket
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป