John Oliver wrote:
> I was looking for a way to keep track of which PID is being used by a
> given instance (among multiple instances) of a program, and found:
> 
> http://developer.novell.com/wiki/index.php/Writing_Init_Scripts
> 
> That page refers to startproc, killproc, and checkproc, which are
> apparantly SUSe-specific commands.  I'm looking for the Red Hat
> equivalents, or whatever the Red Hat way would be to write a PID file
> when starting a process.

daemon &
echo $! > /var/run/daemon.pid


The /etc/init.d/functions set of init functions seems to rely upon the
daemon to 1) background itself and 2) write its own pidfile. In cases
where it does not, is used the /sbin/pidof command to locate it.

-john


-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to