Commit Graph

21 Commits

Author SHA1 Message Date
pgoyette 77cc846abe Use _PATH_WATCHDOG from <paths.h> instead of locally-defined value. 2015-05-06 23:08:30 +00:00
joerg b79356001b static + __dead 2011-08-27 18:57:50 +00:00
wiz a88611257c Fix fd leaks. Found by cppcheck. 2011-01-04 23:48:44 +00:00
lukem 07f7688506 fix sign-compare issues 2009-03-16 12:56:19 +00:00
wiz 003523496e Add -x to usage. 2006-08-13 23:24:53 +00:00
dyoung a79c18d72f Add a flag to wdogctl(8), -x, that activates a user-mode timer that
is NOT disarmed when wdogctl closes the watchdog device.  The -x
mode protects against the case where the kernel kills wdogctl,
sshd, and other essential userland programs (due to memory exhaustion,
for example), lobotomizing a mission-critical NetBSD system and
necessitating an operator visit to reboot it.
2006-08-13 01:11:01 +00:00
dyoung fab0410101 If ioctl(,WDOGIOC_SMODE,) fails, kill the child process before
killing self, instead of the other way around.

Fixes a bug where the child process would use 100% CPU spinning
while it waited for its parent to arm a non-existent watchdog timer.
Now, the child process gets killed, as was intended.
2005-08-31 18:28:58 +00:00
dyoung 1c952b1b24 Cosmetic: KNF. 2005-08-31 18:21:39 +00:00
drochner bad8321653 apply "& WDOG_MODE_MASK" at some places, fixes termination of the
usermode tickler process and watchdog display,
make error handling more reasonable in case a wdog disappeared
2005-01-12 16:18:39 +00:00
wiz da2ab5ca28 Sort options in usage. 2005-01-11 11:30:19 +00:00
smb ddd2ade252 Add a software watchdog timer facility. Because this slightly
changes the "tickle" model of wdogctl(8), it was modified as well;
while I was in there, I cleaned up the argument parsing.

The code was reviewed by simonb@.
2005-01-09 22:51:32 +00:00
jmmv b635f565e7 Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.
2004-01-05 23:23:32 +00:00
itojun 8883e1fb40 use bounded string op 2003-07-13 08:05:58 +00:00
agc c2a3b5ec84 Add NetBSD RCS Ids. 2003-06-23 11:53:35 +00:00
cgd d7666f6c7f use getprogname() 2001-02-20 23:22:49 +00:00
christos a2c613b344 fix nested extern 2001-02-04 21:14:32 +00:00
soren 65c1d02861 Remove extern __progname from enable_user(); no longer used. 2001-01-11 16:37:41 +00:00
lukem 0645f2f67b use explicit name rather than __progname in openlog 2001-01-11 01:34:28 +00:00
lukem d4b8ad46d7 don't use LOG_CONS
fix typo
2001-01-10 07:59:43 +00:00
minoura f23be04b99 #include <string.h> for strlen() and strcpy(). 2000-11-06 07:48:28 +00:00
thorpej fb6f7d6f21 Add a program to manipulate watchdog timers. 2000-11-04 18:53:30 +00:00