]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - kernel/signal.c
[PATCH] add child reaper to pid_namespace
[net-next-2.6.git] / kernel / signal.c
index 9eac4db60eda21a4e6b134fbd21eaca46fbfc2a1..1921ffdc5e777eee98081639ff6960b9baf49010 100644 (file)
@@ -24,6 +24,9 @@
 #include <linux/signal.h>
 #include <linux/capability.h>
 #include <linux/freezer.h>
+#include <linux/pid_namespace.h>
+#include <linux/nsproxy.h>
+
 #include <asm/param.h>
 #include <asm/uaccess.h>
 #include <asm/unistd.h>
@@ -1877,8 +1880,12 @@ relock:
                if (sig_kernel_ignore(signr)) /* Default is nothing. */
                        continue;
 
-               /* Init gets no signals it doesn't want.  */
-               if (current == child_reaper)
+               /*
+                * Init of a pid space gets no signals it doesn't want from
+                * within that pid space. It can of course get signals from
+                * its parent pid space.
+                */
+               if (current == child_reaper(current))
                        continue;
 
                if (sig_kernel_stop(signr)) {