From: Erik van der Kouwe Date: Thu, 24 Jun 2010 14:56:03 +0000 (+0000) Subject: Extra sync to reduce damage of failing shutdowns X-Git-Tag: v3.1.8~360 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/invmod.png?a=commitdiff_plain;h=60112372329b690818031a705c8814b6da98adab;p=minix.git Extra sync to reduce damage of failing shutdowns --- 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);