Date: Thu, 17 Jul 2003 09:57:58 -0400 (EDT) From: Jerry McAllister <jerrymc@clunix.cl.msu.edu> To: bmwz3@attglobal.net Cc: freebsd questions <freebsd-questions@freebsd.org> Subject: Re: /var/run/ pid files Message-ID: <200307171357.h6HDvx1p001784@clunix.cl.msu.edu> In-Reply-To: <20030717013753.4E90843F85@mx1.FreeBSD.org> from "Ronny Hippler" at Jul 16, 2003 09:37:51 PM
next in thread | previous in thread | raw e-mail | index | archive | help
> > On Wed, 16 Jul 2003 21:31:47 +0100, lewiz wrote: > > >> What controls the creation of the pid files in the /var/run/ directory?= > >afaik, sometimes you have to create them yourself. Some programmes > >don't have an option to create one. This can be done easily using a > >combination of ps, grep and awk ;) There's probably a more professional > >way of doing it, but I don't know (I'd be interested to hear though ;) > > Wonder what is creating that directory then? Do you mean the '/var/run' directory? That is put there on initial install I am sure. You should already have one if you have installed FreeBSD, at least any recent version. Programs write their own PID files, almost all of them in /var/run, though there is nothing forcing them to do so. A program could either not do it or put it anywhere they have write access. So, whoever writes/maintains the program puts in code to save the PID to a file. The code is either within the program or some monkey business done in the startup script. Most programs that write PID files also have some sort of config file that is read upon startup and the location of the PID file, amongst other things is usually specified in that config file with the default most often being /var/run/progname.pid. Doesn't that about tell all you need to know on this? The rest is in the code for each specific program. ////jerry > > -- > > Bugs come in through open Windows. > > > Ronny Hippler || Spartanburg SC > http://www.vr5.dyndns.org:8008/ || ftp://ftp.vr5.dyndns.org:2112/ > For PGP key email with "PGPKey" in the subject >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200307171357.h6HDvx1p001784>