On Sat, 23 Dec 2006 20:50:06 +0100
Enrico Weigelt <[EMAIL PROTECTED]> wrote:

> > 2) A simple status call to the init script checks running daemons
> > and returns either 0 or 1 appropriately allowing a sys admin to
> > report on crashed services and possible take an automated action.
> 
> Yes, of course. But that's not what I'm actually looking for.
> Recently I had the problem that some service died, which was necessary
> for another one. While trying to start the other one, I ran into 
> trouble since the init system didn't know about the died service.
> 
> If the lookup would go directly to checking things like pidfiles
> (where applicable) instead of the flag files, such problems would
> (IMHO) be entirely fixed.

OK, read the code yourself as you don't belive me.
http://sources.gentoo.org/viewcvs.py/baselayout/trunk/sh/rc-daemon.sh?rev=2441&view=markup
But as it's Christmas I'll tell you anyway.

A status check will examine every daemon started by start-stop-daemon
in the service and check if it's still running by the process name/exec
file and optional that it's running on the given pid in a pidfile if
specified. If any listed daemons have crashed then the service is
stopped and the stopped status is returned.

Of course, a non root user can query the status too, but in this case
only the init.d/started/service flag is checks as non root users cannot
do the above.

Thanks

Roy
-- 
gentoo-dev@gentoo.org mailing list

Reply via email to