Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Jan 2007 16:50:04 -0600
From:      Paul Schmehl <pauls@utdallas.edu>
To:        FreeBSD Ports <ports@freebsd.org>
Subject:   Problems with pid files
Message-ID:  <EC06AC1114256AA8A0FD45B1@paul-schmehls-powerbook59.local>

next in thread | raw e-mail | index | archive | help
--==========3D6FD8C3DA24A6C48875==========
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

I just discovered a problem with two ports that I maintain, and I need=20
help figuring out how to fix it.  The ports in question are=20
security/sguil-sensor and security/sguil-server.  The problem, which I=20
just discovered today, is that, if both ports are installed on the same=20
machine (not the normal configuration), they create a pidfile with the=20
exact same name.  Therefore, only one of the two ports will run at any=20
given time.

I don't understand why this is happening.  The sguil-sensor port uses an=20
init file named "sensor-agent.sh" and the sguil-server port uses an init=20
file named "sguild.sh".  Both init scripts have the following in them:=20
check_process=3D"${command} /bin/sh".  Both ports require special stop=20
routines to get them to stop properly.

Both processes create a pid named sguild.pid.  I looked at man rc.subr,=20
but I don't see how to set the pidfile rather than checking for it.  Is=20
there a way to force the processes to create unique pidfile names?

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

--==========3D6FD8C3DA24A6C48875==========--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?EC06AC1114256AA8A0FD45B1>