diff options
-rw-r--r-- | usr.sbin/watchdogd/watchdogd.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/usr.sbin/watchdogd/watchdogd.c b/usr.sbin/watchdogd/watchdogd.c index 4b58caf..7bae4ff 100644 --- a/usr.sbin/watchdogd/watchdogd.c +++ b/usr.sbin/watchdogd/watchdogd.c @@ -31,6 +31,7 @@ #include <sys/types.h> __FBSDID("$FreeBSD$"); +#include <sys/mman.h> #include <sys/param.h> #include <sys/rtprio.h> #include <sys/stat.h> @@ -115,6 +116,8 @@ main(int argc, char *argv[]) signal(SIGTERM, sighandler); pidfile_write(pfh); + if (madvise(0, 0, MADV_PROTECT) != 0) + warn("madvise failed"); watchdog_loop(); |