On 14 Jun 2007, at 20:27, Faisal N Jawdat wrote:
> launchd is the new way: you put an xml config file in one of a > number of places and the system magically does the right thing, > starting, stopping, restarting, and monitoring your process as > necessary. It's magic in both good and bad ways. > > The good news is that this is the future that Apple intends to > support, and that it's (allegedly) pretty powerful once you > understand how it all works. The bad news is it's harder to > understand, harder to set up, and doesn't entirely work yet for some > purposes. Specifically it doesn't deal well with processes that > detach at start and then do a clean shutdown by sending a signal from > another process (e.g. apachctl, pg_ctl). > I've found Lingon [1] to be very helpful in understanding and setting up launchd jobs. > Short of learning all about both, you can probably summarize the > decision as: If you can run nginx in a shell and then hit ctrl-c, or > if sending it a HUP causes a clean shutdown, then launchd is probably > the "right" way. It's possible to stop the nginx master process going into the background by adding: daemon: off; to your nginx.conf. [2] BTW, Sending nginx a HUP causes it to reload it's configuration not shutdown. Cheers, Chris [1] http://lingon.sourceforge.net/ [2] http://wiki.codemongers.com/NginxHttpMainModule#daemon --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Deploying Rails" group. To post to this group, send email to rubyonrails-deployment@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-deployment?hl=en -~----------~----~----~----~------~----~------~--~---