Subject: Re: rfc: an alternate user-tickle mode for wdogctl(8)
To: None <tech-userlevel@netbsd.org>
From: David Young <dyoung@pobox.com>
List: tech-userlevel
Date: 08/12/2006 20:08:43
On Mon, Aug 07, 2006 at 12:37:29PM +1000, Daniel Carosone wrote:
> On Sun, Aug 06, 2006 at 09:16:41PM -0500, David Young wrote:
> > How will wdogctl change the mode of the timer as it is being killed off?
> > I don't think it can be done.
>
> How does it currently cancel the timer as it's being killed off? I
> made an assumption there was assistance from the kernel side, with
> flags set, when the fd was closed by the process exiting. If that's
> not the case, and wdogctl tries to clean up in an exit handler, then
> the behaviour you're trying to add can happen now with certain exit
> paths (kill -9) for wdogctl.
The kernel cancels the timer as the process exists. The point of my
change is that the timer must NEVER be cancelled if wdogctl does not
exit normally.
> > Anyway, the net effect would be identical,
> > wouldn't it be?
>
> Probably, so long as you can disable the timer from the command line,
> in between the time when wdogctl exits and when the alarm fires.
> That's my primary concern, because otherwise you can wind up with a
> self-destruct timer you can't stop, and all sorts of bad plot devices
> will ensue.
Good point, I hadn't thought about that plot device. Now that I do:
you only have to 'wdogctl -d' to disarm the watchdog. If Hollywood
doesn't like it, they will have to file a PR.
Dave
--
David Young OJC Technologies
dyoung@ojctech.com Urbana, IL * (217) 278-3933