checking config outputs a pid file

Cherife Li cherife at dotimes.com
Tue May 27 10:05:24 MSD 2008


On 05/27/08 13:48, Jeffrey 'jf' Lim wrote:
> On Tue, May 27, 2008 at 1:31 PM, Igor Sysoev <is at rambler-co.ru 
> <mailto:is at rambler-co.ru>> wrote:
> 
>     On Tue, May 27, 2008 at 11:53:45AM +0800, Cherife Li wrote:
> 
>      > Hi all,
>      >
>      > Has anyone noticed that `nginx -t' outputs an empty pid file
>     while the
>      > nginx process isn't running.
>      >
>      > I can only add
>      >   if [ ! -s $PID ]; then
>      >     rm -f $PID
>      >   fi
>      > to the check-config section of my rc file at the moment.
> 
>     Yes, nginx creates pid file on -t to test possibility to create it.
>     It does not write any pid there and does not remove it.
>     The later was done intentionally because there may be race condition
>     when nginx startes, creates file, then someone run nginx -t, it creates
>     file, and deletes it.
> 
> 
> so in this case, if the file is there already, then running nginx -t 
> will assume that the file creation is ok, and not do anything to it? 
> This seems to be the case for my tests.
>
Emm, same here.
Besides, it test binding the addr.
> -jf
> 
> --
> In the meantime, here is your PSA:
> "It's so hard to write a graphics driver that open-sourcing it would not 
> help."
> -- Andrew Fear, Software Product Manager, NVIDIA Corporation
> http://kerneltrap.org/node/7228
-- 
Rgds,
Cherife.





More information about the nginx mailing list