process: correct behaviour of kill to process 1
authorAlan Cox <alan@linux.intel.com>
Fri, 13 Feb 2015 14:54:35 +0000 (14:54 +0000)
committerAlan Cox <alan@linux.intel.com>
Fri, 13 Feb 2015 14:54:35 +0000 (14:54 +0000)
In unixdom this has a magic exception that only handled signals are delivered
to process 1, those that would kill it are ignored.

Kernel/process.c

index 2e9fc1b..d7d322a 100644 (file)
@@ -453,7 +453,7 @@ void chksigs(void)
                        /* SIGCONT is subtle - we woke the process to handle
                           the signal so ignoring here works fine */
                        if (j == SIGCHLD || j == SIGURG ||
-                           j == SIGIO || j == SIGCONT) {
+                           j == SIGIO || j == SIGCONT || udata.u_ptab->p_pid == 1) {
                                udata.u_ptab->p_pending &= ~m;  // unset the bit
                                continue;
                        }