From: Ben Gras Date: Fri, 21 Oct 2005 11:07:33 +0000 (+0000) Subject: . don't kill tty, send it messages on signals X-Git-Tag: v3.1.2a~577 X-Git-Url: http://zhaoyanbai.com/repos/?a=commitdiff_plain;h=5333d4f4e48ef0b2bec424d7103a87547d0b22e4;p=minix.git . don't kill tty, send it messages on signals . kill processes first, then tell fs to reboot (otherwise fs will have exited its processes and be confused when they exit again) --- diff --git a/servers/pm/main.c b/servers/pm/main.c index f2fec7e83..b71b33c3f 100644 --- a/servers/pm/main.c +++ b/servers/pm/main.c @@ -253,6 +253,7 @@ PRIVATE void pm_init() mproc[RS_PROC_NR].mp_parent = INIT_PROC_NR; /* INIT is root */ sigfillset(&mproc[PM_PROC_NR].mp_ignore); /* guard against signals */ sigfillset(&mproc[FS_PROC_NR].mp_sig2mess); /* forward signals */ + sigfillset(&mproc[TTY_PROC_NR].mp_sig2mess); /* forward signals */ /* Tell FS that no more system processes follow and synchronize. */ mess.PR_PROC_NR = NONE; diff --git a/servers/pm/misc.c b/servers/pm/misc.c index 8e25dbdde..559adcb09 100644 --- a/servers/pm/misc.c +++ b/servers/pm/misc.c @@ -172,8 +172,8 @@ PUBLIC int do_reboot() return(EINVAL); } - tell_fs(REBOOT, 0, 0, 0); /* tell FS to synchronize */ check_sig(-1, SIGKILL); /* kill all processes except init */ + tell_fs(REBOOT, 0, 0, 0); /* tell FS to synchronize */ /* Ask the kernel to abort. All system services, including the PM, will * get a HARD_STOP notification. Await the notification in the main loop.