patch to add a pid file to djabberd
Michael Scherer
misc at mandriva.org
Wed Nov 8 19:32:55 UTC 2006
Le mardi 07 novembre 2006 à 23:10 +0000, Martin Atkins a écrit :
> Michael Scherer wrote:
> > Hi.
> >
> > While trying to write a initscript for djabberd, I have noticed there is
> > no easy way to get the pid file of the daemon, as it fork two times.
> >
> > So I quickly hacked a patch that use File::Pid to do his job, against
> > current svn.
> >
>
> djabberd already has support for writing out a pidfile in the form of a
> "PidFile" configuration directive, but I suppose having it as a command
> line option is useful too.
>
> I don't think the current PidFile implementation cleans up the file when
> DJabberd quits, either; to be honest, I just hacked it in while trying
> to create an init script. :)
In fact, as it create the PidFile before forking, this doesn't work as
expected.
So we could simply use a configuration file directive, and then create
the pid file after the daemonisation ( as in the proposed patch ) ?
--
Michael Scherer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: djabberd.pid_file.diff
Type: text/x-patch
Size: 1003 bytes
Desc: not available
Url : http://lists.danga.com/pipermail/djabberd/attachments/20061108/c3d50d06/djabberd.pid_file.bin
More information about the Djabberd
mailing list