Subject: Re: Suggested enhancement to rc.subr for "master daemons"
To: John Hawkinson <jhawk@MIT.EDU>
From: Greywolf <>
List: tech-userlevel
Date: 12/17/2004 14:33:53
[Thus spake John Hawkinson ("JH: ") 3:59pm...]

JH: > will kill all the running processes unless we go to great lengths
JH: > to write our own stop function.  It occured to someone here that
JH: > we could distinguish the master daemon by using ps output to see
JH: > if it's parent pid is 1, i.e. init, and it occurred to me that
JH: > we might want this feature for more than one daemon.
JH: The problem with this is when there are children that dissociate
JH: themselves from a parent (e.g. double-forking) and reparented to init,
JH: intentionally.

In which case, if one cannot be bothered to write daemons which somehow
maintain their own pidfiles somewhere, one gets what one deserves...

Rule #1:
    If you can't interrupt it, terminate it.
    If you can't terminate it, kill it.
    If you can't kill it, reboot.