Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 May 1997 16:18:58 +1000 (EST)
From:      "Daniel O'Callaghan" <danny@panda.hilink.com.au>
To:        Stephen McKay <syssgm@dtir.qld.gov.au>
Cc:        freebsd-hackers@FreeBSD.ORG, syssgm@dtir.qld.gov.au
Subject:   Re: process monitoring tool (like SysV init)? 
Message-ID:  <Pine.BSF.3.91.970522161309.14689P-100000@panda.hilink.com.au>
In-Reply-To: <199705220518.PAA07067@ogre.dtir.qld.gov.au>

next in thread | previous in thread | raw e-mail | index | archive | help


On Thu, 22 May 1997, Stephen McKay wrote:

> On Wednesday, 21st May 1997, J Wunsch wrote:
> 
> >As Sakari Jalovaara wrote:
> >
> >> It struck me as a rather nice idea.  No more "ps | grep sendmail ...
> >> kill ... sendmail -bd -q1h" - just do "nanny restart sendmail".
> >
> >All `conforming' daemons leave their PID in /var/run/<name>.pid.
> 
> /var/run/* is good, but not foolproof.  A daemon could die and not remove
> its pid file.  An innocent bystander could be shot.  A nanny program (assuming
> it doesn't die :-0 ) would know immediately if one of its children exited.
> 
> I like the idea of a nanny type program, but can't decide whether it should
> be merged with init, much like System V, or kept separate like inetd.

The question in my mind is "How does the nanny know that the program has 
died?".  If the program does not daemonise itself, then SIGCLD takes care 
of that, but if the program *does* daemonise itself, what then?  Would it 
be possible for the kernel to signal an event such as a process dying?  
Does it do this already?  One simple, imperfect way is to grab a pid from 
/var/run, and then watch /proc/{pid}/status.

Danny



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.970522161309.14689P-100000>