daemon off in production

Yaniv Aknin yaniv at aknin.name
Sat Sep 17 04:40:19 UTC 2011


The documentations says I should never run nginx with the daemon off setting
in production. I would like to do so anyway so my Python/twisted based
process manager will have an easier time knowing if nginx terminated or not
(I know there are other ways to do it, but this seems like the easiest; if
I'll be forced to, I'll use another way).

I'm aware of SIGWINCH and nginx in general and especially after version
1.1.1, and I don't mind taking care of guaranteeing nginx will run without a
controlling terminal (I will fork()/setsid() before exec()ing it), run in a
sensible current working directory, etc. I just don't want it to do the
daemonizing double fork.

>From skimming the code, it appears to me that nothing bad should happen.
What am I missing? Why is it so bad to run nginx in the foreground in

 - Yaniv
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20110917/7bbfb04f/attachment.html>

More information about the nginx mailing list