blob: 47801bc7e742dd44a650322e2e8b79bbf463adcf [file] [log] [blame]
Jean Delvare2db02c02006-09-28 09:35:27 +02001#include <stdio.h>
Randy Dunlap56fb9e52006-05-21 20:58:10 -07002#include <stdlib.h>
Jean Delvare2db02c02006-09-28 09:35:27 +02003#include <unistd.h>
Randy Dunlap56fb9e52006-05-21 20:58:10 -07004#include <fcntl.h>
5
6int main(int argc, const char *argv[]) {
7 int fd = open("/dev/watchdog", O_WRONLY);
8 if (fd == -1) {
9 perror("watchdog");
10 exit(1);
11 }
12 while (1) {
13 write(fd, "\0", 1);
14 fsync(fd);
15 sleep(10);
16 }
17}