on 17/12/2013 20:53 Maksim Yevmenkin said the following:
> would anyone object to this patch?
> Index: src/etc/rc.d/watchdogd
> --- src/etc/rc.d/watchdogd (revision 2999)
> +++ src/etc/rc.d/watchdogd (working copy)
> @@ -39,4 +39,7 @@
> load_rc_config $name
> run_rc_command "$1"
I wonder if anyone could object to this rather generic (and NOP by default)
I see your intent, but a few words about it would not hurt :-)
BTW, for a while now we have some support for interacting with the watchdog(9)
from within the kernel. I have the following local patch / hack that makes use
of that support:
Author: Andriy Gapon <a...@icyb.net.ua>
Date: Fri Nov 25 10:00:59 2011 +0200
[test] arm the watchdog before going into the final shutdown/reboot step
... to preclude hanging on that step.
Note: halt assumes the limbo, so no watchdog for that case.
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c
index eaa78b8e..88afaa9 100644
@@ -444,6 +444,11 @@ kern_reboot(int howto)
if ((howto & (RB_HALT|RB_DUMP)) == RB_DUMP && !cold && !dumping)
+ if ((howto & RB_HALT) != 0)
+ wdog_kern_pat(WD_TO_32SEC + 1);
/* Now that we're going to really halt the system... */
Admittedly, there is a gap between userland watchdog being stopped and kernel
watchdog taking over. I wish that we had 'proper' integration between them,
with proper hand-off, etc.
firstname.lastname@example.org mailing list
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"