Home  Contents

rawio:wdinit

Rawio Core4 Lua Event System

SYNOPSIS

handle:wdinit(timeout [, pretimeout])

DESCRIPTION

Initialize watchdog timeouts.

The variable handle must hold a handle to the watchdog device /dev/watchdog.

The first argument, timeout, gives the time in milliseconds after which the watchdog will reset the system if it is not triggered.

The optional second argument, pretimeout, indicates a time window in milliseconds that must elapse between watchdog triggers. If the application tries to retrigger the watchdog faster than the pretimeout, the watchdog will reset the system just as if it had expired.

ERRORS

On the V4 and V4½ platforms, the watchdog can be configured only once. Any further attempt to change the configuration will result in the error code EBUSY.

RETURN VALUE

On success, returns true. On failure, returns nil. In case of an error, the error can be retrieved using rawio:lastError().

SEE ALSO