. 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:
parent
4745238b9c
commit
5333d4f4e4
@ -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;
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user