diff options
author | Willy Tarreau <w@1wt.eu> | 2006-07-16 14:53:40 +0200 |
---|---|---|
committer | Willy Tarreau <willy@wtap.(none)> | 2006-07-26 11:51:24 +0200 |
commit | 78e96be2b59ea39f4c9aba385c3e64324202f124 (patch) | |
tree | e4edf819b1d8f706148cf564d83f746fd4f8d18c /wd | |
parent | [RELEASE] flxutils-0.1.23 (diff) | |
download | flxutils-78e96be2b59ea39f4c9aba385c3e64324202f124.tar.xz |
[RELEASE] flxutils-0.1.24v0.1.24
Diffstat (limited to 'wd')
-rw-r--r-- | wd/wdd.8 | 4 | ||||
-rw-r--r-- | wd/wdd.c | 5 |
2 files changed, 7 insertions, 2 deletions
@@ -32,6 +32,8 @@ System checks are performed in this order : .TP \- Opening of \fB/dev/watchdog\fP if it was not previously open ; .TP +\- Opening of \fB/dev/misc/watchdog\fP if \fB/dev/watchdog\fP failed ; +.TP \- Allocation then release of 4 kB of memory to check that the VM subsystem is still operating, and to give the daemon a chance to die under Out-of-Memory conditions (OOM) ; @@ -64,7 +66,7 @@ accessibility of the root directory every second. Launching it with bombs because it soon will not get enough time slices to ping the driver. .TP -\fBwdd / /dev/watchdog /proc/version /var/run /tmp/. +\fBwdd / /dev/watchdog /proc/self/root /var/run /tmp/. .br Periodically checks all of these existing entries. This ensures that \fB/\fP is always reachable, that \fB/dev\fP has not been wiped out @@ -7,7 +7,8 @@ #include <sys/stat.h> #include <fcntl.h> -const char dev_wd_str[] = "/dev/watchdog"; +const char dev_wd_str[] = "/dev/watchdog"; /* standard entry */ +const char dev_misc_str[] = "/dev/misc/watchdog"; /* devfs entry */ const char root_str[] = "/"; /* @@ -103,6 +104,8 @@ int main (int argc, char **argv) { while (1) { if (dev == -1) dev = open(dev_wd_str, O_RDWR); + if (dev == -1) + dev = open(dev_misc_str, O_RDWR); if ((dev != -1) && (write(dev, dev_wd_str, 1) != 1)) { /* write error, we'll restart */ close(dev); |