[Zebralist] zebrasrv PID file
adam at indexdata.dk
Wed Oct 24 12:04:41 CEST 2007
Merijn van den Kroonenberg wrote:
> I am new to Zebra and I have a question. When starting zebrasrv as daemon, a
> PID is written in the lock/zebrasrv.pid file.
> eg. 6050
> But after that the real server is started:
> 10:29:31-24/10 [server] Starting server zebrasrv pid=6051
> As a result the PID in the zebrasrv.pid file is "obsolete" (process does not
> exist anymore).
> Also I noticed, if the previous process id was 33333 and the new id is 2222
> then the pid file wil show 22223 (looks like data is overwritten but not
> I wanted to use this zebrasrv.pid to make a shutdown script. I guess this
> has to be done in another way. Any suggestions/pointers?
You are right that in daemon mode, it's incorrect. The -D option is
handled by YAZ and Zebra does not "know" forking is in effect. IMHO, the
zebrasrv.pid should go away.. The YAZ GFS has an option, -p, which
allows you to specify the lock file. i.e.
zebrasrv -D -p good.pid
There is another reason why zebrasrv should not write a PID file..
Privileges are wrong.. We want the PID file to be written in the
"privileged" mode and sometimes not in the current directory (or zebra's
lock directory). The preferred location is /var/run on many systems.. So
zebrasrv -u nobody -p /var/run/zebrasrv.pid -l \
> Additionally I wondered if this list is searchable, i found the browsable
> archive at http://lists.indexdata.dk/pipermail/zebralist/, but (ironically
> ;-) ) no search functionality.
> Merijn van den Kroonenberg
> Web2All B.V.
> Telefoon: +31 475 775511
> Fax: +31 475 338290
> Email: merijn at web2all.nl
> Website: http://www.web2all.nl
> Zebralist mailing list
> Zebralist at lists.indexdata.dk
More information about the Zebralist