chiark / gitweb /
main: disarm watchdog when preparing for reexecution
[elogind.git] / src / main.c
index 6656cb4ef093bb6499f918bcf7db13d436e9ba48..4e800e7430224f0a0219b1dd88fcea2e49cbc980 100644 (file)
@@ -1631,6 +1631,11 @@ finish:
 
                 assert(i <= ELEMENTSOF(args));
 
+                /* Close and disarm the watchdog, so that the new
+                 * instance can reinitialize it, but doesn't get
+                 * rebooted while we do that */
+                watchdog_close(true);
+
                 execv(args[0], (char* const*) args);
 
                 log_error("Failed to reexecute: %m");