X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: "Bryan D. Thomas" Subject: Re: how to create a syslog-ng pidfile Date: Mon, 3 Apr 2006 20:54:42 -0700 Lines: 26 Message-ID: References: <20060402194047 DOT 15398 DOT qmail AT web31307 DOT mail DOT mud DOT yahoo DOT com> X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com > To generate a pidfile for syslog-ng, should I try the > -p switch to syslog-ng, (i.e. using the -a argument to > cygrunsrv) or the -x argument to cygrunsrv? I tried removing the service using cygrunsrv, then installing the service with the changed option. But, when starting the service again, a pid file was not created using either method. I checked in the source, where I found that the pidfile is created in the go_background function. This function is not called when the -F argument is passed to syslog-ng. A variable called do_fork is set to 0. Only if do_fork is 1 does go_background() get called. So, it is as I feared, and it is not trivial to get a pid file created. Having discovered that this is not a Cygwin-specific issue, I'll stop adding to the mail volume of this list now. I'm sure there's a good reason for the -F argument to be passed when syslog-ng is started as a Windows service using cygrunsrv. I am curious if someone would like to explain this, if it would be of value to those interested in Cygwin topics. Thanks, Bryan -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/