Problems with pid files

Paul Schmehl pauls at utdallas.edu
Sat Jan 13 23:19:43 UTC 2007


--On January 13, 2007 4:50:04 PM -0600 Paul Schmehl <pauls at utdallas.edu> 
wrote:

> I just discovered a problem with two ports that I maintain, and I need
> help figuring out how to fix it.  The ports in question are
> security/sguil-sensor and security/sguil-server.  The problem, which I
> just discovered today, is that, if both ports are installed on the same
> machine (not the normal configuration), they create a pidfile with the
> exact same name.  Therefore, only one of the two ports will run at any
> given time.
>
> I don't understand why this is happening.  The sguil-sensor port uses an
> init file named "sensor-agent.sh" and the sguil-server port uses an init
> file named "sguild.sh".  Both init scripts have the following in them:
> check_process="${command} /bin/sh".  Both ports require special stop
> routines to get them to stop properly.
>
This should have been check_process="${procname} /bin/sh".

> Both processes create a pid named sguild.pid.

This is incorrect.  The sguil-server port creates sguild.pid, and the 
sguil-sensor port creates sensor-agent.pid.

However, I'm still having the problem of the second process's startup 
failing because it thinks the pid already exists.  (Doesn't matter which 
process you start first.)  Any hints would be appreciated.

Paul Schmehl (pauls at utdallas.edu)
Senior Information Security Analyst
The University of Texas at Dallas
http://www.utdallas.edu/ir/security/


More information about the freebsd-ports mailing list