Protect the watchdog daemon against swap OOM killer. This is similar to
SVN r199804 which added protection to sshd, cron, syslogd, and inetd.
This commit is contained in:
parent
315490e031
commit
f145c771fb
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user