<div dir="ltr">Hi,<div><br></div><div>The documentations says I should never run nginx with the <font class="Apple-style-span" face="'courier new', monospace">daemon off</font><font class="Apple-style-span" face="arial, helvetica, sans-serif"> setting in production. </font>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).</div>
<div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">I'm aware of </font><font class="Apple-style-span" face="'courier new', monospace">SIGWINCH</font><font class="Apple-style-span" face="arial, helvetica, sans-serif"> 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 </font><font class="Apple-style-span" face="'courier new', monospace">fork()</font><font class="Apple-style-span" face="arial, helvetica, sans-serif">/</font><font class="Apple-style-span" face="'courier new', monospace">setsid()</font><font class="Apple-style-span" face="arial, helvetica, sans-serif"> before </font><font class="Apple-style-span" face="'courier new', monospace">exec()</font><font class="Apple-style-span" face="arial, helvetica, sans-serif">ing it), run in a sensible current working directory, etc. I just don't want it to do the daemonizing double fork.</font></div>
<div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">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 production?</font></div>
<div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">Thanks,</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif"> - Yaniv</font></div>
</div>