blob: 85cf17c48669d73111ff14ae8490417425da7030 [file] [log] [blame]
Randy Dunlap56fb9e52006-05-21 20:58:10 -07001#include <stdlib.h>
2#include <fcntl.h>
3
4int main(int argc, const char *argv[]) {
5 int fd = open("/dev/watchdog", O_WRONLY);
6 if (fd == -1) {
7 perror("watchdog");
8 exit(1);
9 }
10 while (1) {
11 write(fd, "\0", 1);
12 fsync(fd);
13 sleep(10);
14 }
15}