From 5e60838b5dc5e0af21fa3d816c7210c9cf742647 Mon Sep 17 00:00:00 2001 From: Brian Feldman Date: Fri, 23 Jul 2004 15:24:57 +0000 Subject: [PATCH] Now that mlockall(2) is unbroken, use it to keep watchdogd(8) permanently out of swap. --- usr.sbin/watchdogd/watchdogd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr.sbin/watchdogd/watchdogd.c b/usr.sbin/watchdogd/watchdogd.c index 0c1b6258bede..298d39e42c43 100644 --- a/usr.sbin/watchdogd/watchdogd.c +++ b/usr.sbin/watchdogd/watchdogd.c @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -87,6 +88,9 @@ main(int argc, char *argv[]) if (rtprio(RTP_SET, 0, &rtp) == -1) err(EX_OSERR, "rtprio"); + if (mlockall(MCL_CURRENT | MCL_FUTURE) == -1) + err(EX_OSERR, "mlockall"); + if (watchdog_init() == -1) errx(EX_SOFTWARE, "unable to initialize watchdog");