patch to add a pid file to djabberd

Michael Scherer misc at
Wed Nov 8 08:53:34 UTC 2006

Le mercredi 08 novembre 2006 00:10, 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.

Woops, seems I started to code too soon. To me, a configuration option is 

> 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. :)

Cleaning the file would be good, and it is a two lines patch ( even if I guess 
having more check against the file before the unlink would be safer ).

Michael Scherer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: djabberd.pidfile_remove.diff
Type: text/x-diff
Size: 528 bytes
Desc: not available
Url :

More information about the Djabberd mailing list