|
@@ -753,7 +753,9 @@ static int wd_exec_exit_fn (void)
|
|
|
|
|
|
|
|
if (dog > 0) {
|
|
if (dog > 0) {
|
|
|
log_printf (LOGSYS_LEVEL_INFO, "magically closing the watchdog.");
|
|
log_printf (LOGSYS_LEVEL_INFO, "magically closing the watchdog.");
|
|
|
- write (dog, &magic, 1);
|
|
|
|
|
|
|
+ if (write (dog, &magic, 1) == -1) {
|
|
|
|
|
+ log_printf (LOGSYS_LEVEL_ERROR, "failed to write %c to dog(%d).", magic, dog);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|