Sophie

Sophie

distrib > Scientific%20Linux > 55 > i386 > by-pkgid > a4374422d14697f48a2019f01dabbc99 > files > 1026

kernel-doc-2.6.18-371.3.1.el5.noarch.rpm

#include <stdlib.h>
#include <fcntl.h>

int main(int argc, const char *argv[]) {
	int fd = open("/dev/watchdog", O_WRONLY);
	if (fd == -1) {
		perror("watchdog");
		exit(1);
	}
	while (1) {
		write(fd, "\0", 1);
		fsync(fd);
		sleep(10);
	}
}