8 messages in ru.sysoev.nginxRe: checking config outputs a pid file
FromSent OnAttachments
Cherife LiMay 26, 2008 8:53 pm 
Jeffrey 'jf' LimMay 26, 2008 9:51 pm 
Igor SysoevMay 26, 2008 10:30 pm 
Jeffrey 'jf' LimMay 26, 2008 10:47 pm 
Cherife LiMay 26, 2008 10:48 pm 
Cherife LiMay 26, 2008 10:56 pm 
Igor SysoevMay 26, 2008 11:03 pm 
Cherife LiMay 26, 2008 11:05 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: checking config outputs a pid fileActions...
From:Igor Sysoev (is-G@public.gmane.org)
Date:May 26, 2008 10:30:58 pm
List:ru.sysoev.nginx

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.