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.
This commit is contained in:
Ben Gras 2006-03-10 17:35:55 +00:00
parent 682efc75e5
commit 9b1d4ef233
2 changed files with 5 additions and 2 deletions

View file

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

View file

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