Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 92930d9e authored by Randy Dunlap's avatar Randy Dunlap Committed by Wim Van Sebroeck
Browse files

[WATCHDOG] Documentation/watchdog/watchdog-api.txt - fix watchdog daemon



Fix the simple watchdog daemon program in Doc/watchdog/watchdog-api.txt
to build cleanly.

Signed-off-by: default avatarRandy Dunlap <rdunlap@xenotime.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
parent 7071e522
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -36,6 +36,9 @@ timeout or margin. The simplest way to ping the watchdog is to write
some data to the device.  So a very simple watchdog daemon would look
like this:

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

int main(int argc, const char *argv[]) {
	int fd=open("/dev/watchdog",O_WRONLY);
	if (fd==-1) {