On Wed, Nov 22, 2017 at 10:37 PM, Gena Makhomed <[email protected]> wrote:

>
> This is bug in nginx code? And this bug should be fixed in nginx?
>
> But "daemon(); write_pidfile();" is common pattern
> used by many services and even in library functions.
>
>
It may be common, but not necessarily correct. The parent process should
only exit *after* finishing all the preparations (i.e. something like
"fork(); write_pidfile(); exit()"), since systemd uses the exit as a signal
that the daemon is now "ready".

-- 
Mantas Mikulėnas <[email protected]>
_______________________________________________
systemd-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to