}
/* We're done with the watchdog. Note that the watchdog is explicitly not stopped here. It remains
- * active to guard against any issues during the rest of the shutdown sequence. */
+ * active to guard against any issues during the rest of the shutdown sequence. Note that we
+ * explicitly close the device with disarm=false here, before releasing the rest of the watchdog
+ * data. */
+ watchdog_close(/* disarm= */ false);
watchdog_free_device();
- arguments[0] = NULL; /* Filled in by execute_directories(), when needed */
- arguments[1] = arg_verb;
- arguments[2] = NULL;
- (void) execute_directories(dirs, DEFAULT_TIMEOUT_USEC, NULL, NULL, arguments, NULL, EXEC_DIR_PARALLEL | EXEC_DIR_IGNORE_ERRORS);
+ const char *arguments[] = {
+ NULL, /* Filled in by execute_directories(), when needed */
+ arg_verb,
+ NULL,
+ };
+ (void) execute_directories(dirs, DEFAULT_TIMEOUT_USEC, NULL, NULL, (char**) arguments, NULL, EXEC_DIR_PARALLEL | EXEC_DIR_IGNORE_ERRORS);
(void) rlimit_nofile_safe();