]> Zhao Yanbai Git Server - minix.git/commitdiff
PM: do not panic if sys_sigsend returns ENOMEM
authorDavid van Moolenbroek <david@minix3.org>
Fri, 9 Nov 2012 16:09:20 +0000 (16:09 +0000)
committerDavid van Moolenbroek <david@minix3.org>
Fri, 9 Nov 2012 16:11:02 +0000 (16:11 +0000)
servers/pm/signal.c

index 5e2901f72733a3631fe95cf27351e914a6e5fe4f..acf7a478545132cd48a76eec1bbf4fb05672cbdb 100644 (file)
@@ -738,10 +738,10 @@ int signo;                        /* signal to send to process (1 to _NSIG-1) */
 
   /* Ask the kernel to deliver the signal */
   r = sys_sigsend(rmp->mp_endpoint, &sigmsg);
/* sys_sigsend can fail legitimately with EFAULT if
-  * the process memory can't accomodate the signal handler.
-  */
-  if(r == EFAULT) {
 /* sys_sigsend can fail legitimately with EFAULT or ENOMEM if
+   * the process memory can't accomodate the signal handler.
+   */
+  if(r == EFAULT || r == ENOMEM) {
        return(FALSE);
   }
   /* Other errors are unexpected pm/kernel discrepancies. */