mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
Now that mlockall(2) is unbroken, use it to keep watchdogd(8) permanently
out of swap.
This commit is contained in:
parent
d593f6eda9
commit
5e60838b5d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=132581
@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/rtprio.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/watchdog.h>
|
||||
|
||||
#include <err.h>
|
||||
@ -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");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user