On Tue, May 27, 2008 at 1:31 PM, Igor Sysoev &lt;<a href="mailto:is@rambler-co.ru">is@rambler-co.ru</a>&gt; wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c">On Tue, May 27, 2008 at 11:53:45AM +0800, Cherife Li wrote:<br>
<br>
&gt; Hi all,<br>
&gt;<br>
&gt; Has anyone noticed that `nginx -t&#39; outputs an empty pid file while the<br>
&gt; nginx process isn&#39;t running.<br>
&gt;<br>
&gt; I can only add<br>
&gt; &nbsp; if [ ! -s $PID ]; then<br>
&gt; &nbsp; &nbsp; rm -f $PID<br>
&gt; &nbsp; fi<br>
&gt; to the check-config section of my rc file at the moment.<br>
<br>
</div></div>Yes, nginx creates pid file on -t to test possibility to create it.<br>
It does not write any pid there and does not remove it.<br>
The later was done intentionally because there may be race condition<br>
when nginx startes, creates file, then someone run nginx -t, it creates<br>
file, and deletes it.<br>
<font color="#888888"></font></blockquote><div><br>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.<br>
<br>-jf<br></div></div><br>--<br>In the meantime, here is your PSA:<br>&quot;It&#39;s so hard to write a graphics driver that open-sourcing it would not help.&quot;<br> -- Andrew Fear, Software Product Manager, NVIDIA Corporation<br>
<a href="http://kerneltrap.org/node/7228">http://kerneltrap.org/node/7228</a>