From: Ben Gras Date: Fri, 21 Oct 2005 11:10:16 +0000 (+0000) Subject: Added explanation of SIGKILL, REBOOT order. X-Git-Tag: v3.1.2a~576 X-Git-Url: http://zhaoyanbai.com/repos/?a=commitdiff_plain;h=629453fba805b53bc0d719bdce4e345e683a36fd;p=minix.git Added explanation of SIGKILL, REBOOT order. --- diff --git a/servers/pm/misc.c b/servers/pm/misc.c index 559adcb09..aadd84b6a 100644 --- a/servers/pm/misc.c +++ b/servers/pm/misc.c @@ -172,6 +172,11 @@ PUBLIC int do_reboot() return(EINVAL); } + /* Order matters here. When FS is told to reboot, it exits all its + * processes, and then would be confused if they're exited again by + * SIGKILL. So first kill, then reboot. + */ + check_sig(-1, SIGKILL); /* kill all processes except init */ tell_fs(REBOOT, 0, 0, 0); /* tell FS to synchronize */