Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

thin daemonized doesn't stop on macosx

#131

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

Reported by Federico Galassi · April 9th, 2010 @ 12:51 PM

State: new
Milestone: none
Assigned to: macournoyer macournoyer

Activity

  1. pedz
    pedz

    I hit this on 1.2.7 and 1.2.11.

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

    June 12th, 2011 @ 07:01 PM

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.