From: Ben Gras Date: Fri, 10 Mar 2006 17:35:55 +0000 (+0000) Subject: special case when exiting FS - don't core dump and don't tell FS about it X-Git-Tag: v3.1.2a~257 X-Git-Url: http://zhaoyanbai.com/repos/man.named-checkzone.html?a=commitdiff_plain;h=9b1d4ef23324e976b8b94262c89089d94d2beb01;p=minix.git special case when exiting FS - don't core dump and don't tell FS about it Because if FS is hanging in a signal, the exit won't work. This way FS gets exited on e.g. SIGSEGV. --- diff --git a/servers/pm/forkexit.c b/servers/pm/forkexit.c index 8e3cbf9f5..a0a4cb62d 100644 --- a/servers/pm/forkexit.c +++ b/servers/pm/forkexit.c @@ -173,7 +173,10 @@ int exit_status; /* the process' exit status (for parent) */ * such as copying to/ from the exiting process, before it is gone. */ sys_nice(proc_nr_e, PRIO_STOP); /* stop the process */ - tell_fs(EXIT, proc_nr_e, 0, 0); /* tell FS to free the slot */ + if(proc_nr_e != FS_PROC_NR) /* if it is not FS that is exiting.. */ + tell_fs(EXIT, proc_nr_e, 0, 0); /* tell FS to free the slot */ + else + printf("PM: FS died\n"); if((r=sys_exit(proc_nr_e)) != OK) /* destroy the process */ panic(__FILE__,"pm_exit: sys_exit failed", r); diff --git a/servers/pm/signal.c b/servers/pm/signal.c index fe971f135..f555444fa 100644 --- a/servers/pm/signal.c +++ b/servers/pm/signal.c @@ -501,7 +501,7 @@ doterminate: if (sigismember(&ign_sset, signo)) return; rmp->mp_sigstatus = (char) signo; - if (sigismember(&core_sset, signo)) { + if (sigismember(&core_sset, signo) && slot != FS_PROC_NR) { #if ENABLE_SWAP if (rmp->mp_flags & ONSWAP) { /* Process is swapped out, leave signal pending. */