#include #include #include int main(void) { int i = 0; printf("Starting systemd watchdog test\n"); while(1) { if(i < 5) { printf("Petting watchdog\n"); sd_notify(0,"WATCHDOG=1"); i++; } sleep(1); } }