]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - include/linux/sched.h
prctl: add PR_{SET,GET}_CHILD_SUBREAPER to allow simple process supervision
[mirror_ubuntu-zesty-kernel.git] / include / linux / sched.h
index 0c147a4260a51b47e79e347d9aa4239969a5d638..0c3854b0d4b180670563c461c8d0feaf4bd96c3a 100644 (file)
@@ -553,6 +553,18 @@ struct signal_struct {
        int                     group_stop_count;
        unsigned int            flags; /* see SIGNAL_* flags below */
 
+       /*
+        * PR_SET_CHILD_SUBREAPER marks a process, like a service
+        * manager, to re-parent orphan (double-forking) child processes
+        * to this process instead of 'init'. The service manager is
+        * able to receive SIGCHLD signals and is able to investigate
+        * the process until it calls wait(). All children of this
+        * process will inherit a flag if they should look for a
+        * child_subreaper process at exit.
+        */
+       unsigned int            is_child_subreaper:1;
+       unsigned int            has_child_subreaper:1;
+
        /* POSIX.1b Interval Timers */
        struct list_head posix_timers;