. 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)
This commit is contained in:
Ben Gras 2005-10-21 11:07:33 +00:00
parent 4745238b9c
commit 5333d4f4e4
2 changed files with 2 additions and 1 deletions

View File

@ -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;

View File

@ -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.