]> Zhao Yanbai Git Server - minix.git/commitdiff
Extra sync to reduce damage of failing shutdowns
authorErik van der Kouwe <erik@minix3.org>
Thu, 24 Jun 2010 14:56:03 +0000 (14:56 +0000)
committerErik van der Kouwe <erik@minix3.org>
Thu, 24 Jun 2010 14:56:03 +0000 (14:56 +0000)
commands/reboot/halt.c

index 8cc385d81008b95156695d9a1bdb1a779678f186..e7bd7808b42f5151e1c37febf3565ff3028806b6 100644 (file)
@@ -118,6 +118,9 @@ char **argv;
   /* Tell init to stop spawning getty's. */
   kill(1, SIGTERM);
 
+  /* Extra sync for the case where SIGTERM causes deadlock */
+  sync();
+
   /* Give everybody a chance to die peacefully. */
   printf("Sending SIGTERM to all processes ...\n");
   kill(-1, SIGTERM);