repo.or.cz
/
linux-2.6
/
verdex.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[PATCH] core-dumping unreadable binaries via PT_INTERP
[linux-2.6/verdex.git]
/
Documentation
/
watchdog
/
src
/
watchdog-simple.c
blob
47801bc7e742dd44a650322e2e8b79bbf463adcf
1
#include <stdio.h>
2
#include <stdlib.h>
3
#include <unistd.h>
4
#include <fcntl.h>
5
6
int
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
}