projects
/
linux-2.6
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
[linux-2.6]
/
Documentation
/
watchdog
/
src
/
watchdog-simple.c
1
#include <stdlib.h>
2
#include <fcntl.h>
3
4
int 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
}