[JDEV] modifying jabberd to run as daemon

Ralph Siemsen ralphs at blueairnetworks.com
Mon Jun 3 10:36:45 CDT 2002


Justin Georgeson wrote:
> I've been able rearrange some of the code in jabberd.c to get the port 
> bound before setgid/setuid and fork. This lets me run jabberd on 
> privileged ports as a nonroot user. The problem is the pidfile is still 
> owned by root and has the wrong pid. Can anyone point me in the right 
> direction?
> 

Cool, I was complaining about this not long ago.  The create/check of 
the pidfile happens in jabberd/config.c around line 161... but I'm sure 
you already know that.  I'll bet you're getting the parent's pid now?
I'm guessing the fork call got moved, right?  So the pid is being 
generated before the child process is forked.

-R





More information about the JDev mailing list