This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: how to create a syslog-ng pidfile


> 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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]