SYNOPSIS
DESCRIPTION
The watchdog timer triggers a system reset if the main program, due to some fault condition, neglects to regularly service the watchdog.
At system startup, the watchdog timer runs on automatic and is triggered once a second by the task switcher. If the hardware malfunctions enough to keep the kernel from running, the system will automatically reset.
An application may chose to handle the watchdog itself by opening /dev/watchdog. Once the device is open, it is up to the application to keep the watchdog from resetting the system. To trigger the watchdog, write any data to the device.
When the application exits or closes the device, the watchdog will normally not return to automatic mode. Thus, on an application crash, the watchdog will reset the system once it times out. To restore the watchdog to automatic mode on application exit, write the single character 'V' to the watchdog device before closing it.
The default reset timeout is 16 seconds on the V4 and V4½ platforms. The timeout can be reconfigured once after each system startup using rawio:wdinit().