]> Zhao Yanbai Git Server - minix.git/commitdiff
If a process does sys_kill on SELF (such as in panic() of servers and drivers
authorBen Gras <ben@minix3.org>
Fri, 23 Feb 2007 12:55:29 +0000 (12:55 +0000)
committerBen Gras <ben@minix3.org>
Fri, 23 Feb 2007 12:55:29 +0000 (12:55 +0000)
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.

kernel/system/do_kill.c

index 289bcc099a145eee62664506e0848c982699fc66..e102bed2fdd598bb83100c94842634f16931e9f8 100644 (file)
@@ -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);
 }