From: Ben Gras Date: Fri, 3 Feb 2006 15:21:00 +0000 (+0000) Subject: Don't kill processes by signals in process group 0, and do a sync before X-Git-Tag: v3.1.2a~385 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/doxygen.png?a=commitdiff_plain;h=040cebcefe3297b70420670f6bddc243dbfda170;p=minix.git Don't kill processes by signals in process group 0, and do a sync before killing all processes in FS reboot. --- diff --git a/servers/fs/misc.c b/servers/fs/misc.c index 4fd694784..79ec55d16 100644 --- a/servers/fs/misc.c +++ b/servers/fs/misc.c @@ -258,6 +258,9 @@ PUBLIC int do_reboot() /* Only PM may make this call directly. */ if (who != PM_PROC_NR) return(EGENERIC); + /* Sync before the drivers die. */ + do_sync(); + /* Do exit processing for all leftover processes and servers. */ for (i = 0; i < NR_PROCS; i++) { m_in.slot1 = i; do_exit(); } diff --git a/servers/pm/signal.c b/servers/pm/signal.c index 6765d4735..25534d8c4 100644 --- a/servers/pm/signal.c +++ b/servers/pm/signal.c @@ -524,6 +524,7 @@ int signo; /* signal to send to process (0 to _NSIG) */ if (proc_id == 0 && mp->mp_procgrp != rmp->mp_procgrp) continue; if (proc_id == -1 && rmp->mp_pid <= INIT_PID) continue; if (proc_id < -1 && rmp->mp_procgrp != -proc_id) continue; + if (rmp->mp_procgrp == 0) continue; /* Check for permission. */ if (mp->mp_effuid != SUPER_USER