diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2005-09-24 17:39:53 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2005-09-24 17:39:53 +0000 |
commit | 67a7d18a0de8f60fafd514d5dfb4a44ff4cceab8 (patch) | |
tree | a74994039b63358d8340e3322c8a177a2e174c49 /usr.sbin | |
parent | 753cdd3a62a31be80e2624590c52456ab562fc46 (diff) |
give it a bit highr priority and exit w/ failure if systcl ever fails; marc@ henning@ ok some time ago...
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/watchdogd/watchdogd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/watchdogd/watchdogd.c b/usr.sbin/watchdogd/watchdogd.c index 51f5dcbd184..2ab21d24ce0 100644 --- a/usr.sbin/watchdogd/watchdogd.c +++ b/usr.sbin/watchdogd/watchdogd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: watchdogd.c,v 1.4 2005/08/09 15:09:06 mickey Exp $ */ +/* $OpenBSD: watchdogd.c,v 1.5 2005/09/24 17:39:52 mickey Exp $ */ /* * Copyright (c) 2005 Marc Balmer <marc@msys.ch> @@ -134,13 +134,14 @@ main(int argc, char *argv[]) } (void)mlockall(MCL_CURRENT | MCL_FUTURE); + setpriority(PRIO_PROCESS, getpid(), -5); signal(SIGTERM, sighdlr); retval = 0; while (!quit) { if (sysctl(mib, 3, NULL, 0, &period, sizeof(period)) == -1) - quit = 1; + quit = retval = 1; sleep(interval); } |