From 60112372329b690818031a705c8814b6da98adab Mon Sep 17 00:00:00 2001 From: Erik van der Kouwe Date: Thu, 24 Jun 2010 14:56:03 +0000 Subject: [PATCH] Extra sync to reduce damage of failing shutdowns --- commands/reboot/halt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/commands/reboot/halt.c b/commands/reboot/halt.c index 8cc385d81..e7bd7808b 100644 --- a/commands/reboot/halt.c +++ b/commands/reboot/halt.c @@ -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); -- 2.44.0