svn commit: r214345 - stable/8/usr.sbin/watchdogd
Attilio Rao
attilio at FreeBSD.org
Mon Oct 25 15:17:31 UTC 2010
Author: attilio
Date: Mon Oct 25 15:17:31 2010
New Revision: 214345
URL: http://svn.freebsd.org/changeset/base/214345
Log:
MFC r213181 by emaste:
Protect the watchdog daemon against swap OOM killer.
Sponsored by: Sandvine Incorporated
Modified:
stable/8/usr.sbin/watchdogd/watchdogd.c
Directory Properties:
stable/8/usr.sbin/watchdogd/ (props changed)
Modified: stable/8/usr.sbin/watchdogd/watchdogd.c
==============================================================================
--- stable/8/usr.sbin/watchdogd/watchdogd.c Mon Oct 25 15:11:10 2010 (r214344)
+++ stable/8/usr.sbin/watchdogd/watchdogd.c Mon Oct 25 15:17:31 2010 (r214345)
@@ -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>
@@ -117,6 +118,8 @@ main(int argc, char *argv[])
signal(SIGTERM, sighandler);
pidfile_write(pfh);
+ if (madvise(0, 0, MADV_PROTECT) != 0)
+ warn("madvise failed");
watchdog_loop();
More information about the svn-src-stable
mailing list