#131 new
Federico Galassi

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


Comments and changes to this ticket

  • pedz

    pedz June 12th, 2011 @ 07:01 PM

    • Milestone order changed from “0” to “0”

    I hit this on 1.2.7 and 1.2.11.

    I made the same changes described above and got the same results.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป