From: Ben Gras Date: Fri, 23 Feb 2007 12:55:29 +0000 (+0000) Subject: If a process does sys_kill on SELF (such as in panic() of servers and drivers X-Git-Tag: v3.1.3~60 X-Git-Url: http://zhaoyanbai.com/repos/Bv9ARM.ch12.html?a=commitdiff_plain;h=a9f2f36f46e16ae2fb58c62ac4aa240566f863a2;p=minix.git If a process does sys_kill on SELF (such as in panic() of servers and drivers if a PM exit fails, until they are compiled with the new panic() function that is), don't reply to it as the endpoint has been cleared. --- diff --git a/kernel/system/do_kill.c b/kernel/system/do_kill.c index 289bcc099..e102bed2f 100644 --- a/kernel/system/do_kill.c +++ b/kernel/system/do_kill.c @@ -41,8 +41,11 @@ message *m_ptr; /* pointer to request message */ /* Set pending signal to be processed by the PM. */ cause_sig(proc_nr, sig_nr); - if (sig_nr == SIGKILL) + if (sig_nr == SIGKILL) { clear_endpoint(proc_addr(proc_nr)); + if(m_ptr->SIG_ENDPT == SELF) + return EDONTREPLY; + } return(OK); }