All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lennart Poettering <lennart-mdGvqq1h2p+GdvJs77BJ7Q@public.gmane.org>
To: "Michael Kerrisk (man-pages)"
	<mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Shawn Landden
	<shawnlandden-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Kay Sievers <kay-tD+1rO4QERM@public.gmane.org>,
	Oleg Nesterov <oleg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH] prctl.2: PR_{SET,GET}_CHILD_SUBREAPER
Date: Fri, 8 Feb 2013 17:05:57 +0100	[thread overview]
Message-ID: <20130208160556.GB2902@tango.0pointer.de> (raw)
In-Reply-To: <CAKgNAkiSDk87FwgRJ2BZmH+s-qvHk+4mg0jmxar1kMbSLSLUEw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Fri, 08.02.13 10:35, Michael Kerrisk (man-pages) (mtk.manpages@gmail.com) wrote:

> 
> Shawn, Lennart, Kay,
> 
> On Wed, Feb 6, 2013 at 7:33 PM, Shawn Landden <shawnlandden-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > Signed-off-by: Shawn Landden <shawnlandden-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > ---
> >  man2/prctl.2 |   17 +++++++++++++++++
> >  1 file changed, 17 insertions(+)
> >
> > diff --git a/man2/prctl.2 b/man2/prctl.2
> > index e4a1030..fd78f48 100644
> > --- a/man2/prctl.2
> > +++ b/man2/prctl.2
> > @@ -379,6 +379,23 @@ if the kernel is configured with
> >  .B CONFIG_SECCOMP
> >  enabled.
> >  .TP
> > +.BR PR_SET_CHILD_SUBREAPER " (since Linux 3.3)"
> > +Designates this process as a service manager for its' (immediate and
> > +indirect) offspring processes. Any process whose immediate parent
> > +dies and whose ancestry includes a process where this flag is set will
> > +be reparented to the closest process with this flag set, instead of PID
> > +1. A 'subreaper' hence receives
> > +.B SIGHCLD
> > +signals for any orphaned
> > +offspring processes, that otherwise would be received by
> > +.BR init (8).
> > +.TP
> > +.BR PR_GET_CHILD_SUBREAPER " (since Linux 3.3)"
> > +Returns whether calling process is a child subreaper (see
> > +.BR PR_SET_CHILD_SUBREAPER ),
> > +in the location pointed to by
> > +.IR "(int\ *) arg2" .
> > +.TP
> >  .BR PR_SET_SECUREBITS " (since Linux 2.6.26)"
> >  Set the "securebits" flags of the calling thread to the value supplied in
> >  .IR arg2 .
> 
> Shawn, there was some imprecision in your patch. I've instead come up
> with an alternative.
> 
> Kay, Lennart, is the following correct?
> 
>        PR_SET_CHILD_SUBREAPER (since Linux 3.4)
>               If  arg2 is nonzero, set the "child subreaper" attribute
>               of the calling process;  if  arg2  is  zero,  unset  the
>               attribute.   When  a  process  is marked as a child sub‐
>               reaper, all of the children that it creates,  and  their
>               descendants,  will  be marked as having a subreaper.  in
>               effect, a subreaper fulfills the role of init(1) for its
>               descendant  processes.   Upon  termination  of a process
>               that is orphaned (i.e., its immediate parent has already
>               terminated)  and marked as having a subreaper, the near‐
>               est still  living  ancestor  subreaper  will  receive  a
>               SIGCHLD  signal and be able to wait(2) on the process to
>               diiscover its termination status.
> 
>        PR_GET_CHILD_SUBREAPER (since Linux 3.4)
>               Return the "child subreaper" setting of the  caller,  in
>               the location pointed to by (int *) arg2.
> 

Sounds good to me! Though s/in/In/ once in there.

Thanks for putting this together, sorry for never having done this
myself.

Oh, yeah, and I still need to do that book review for you, too!

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2013-02-08 16:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-04 20:46 [PATCH 1/3] prctl.2: document new seccomp options Shawn Landden
     [not found] ` <1344113204-4294-1-git-send-email-shawnlandden-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-08-04 20:46   ` [PATCH 2/3] prctl.2: document PR_GET_TIMESLACK and PR_SET_TIMESLACK Shawn Landden
2012-08-04 20:46   ` [PATCH 3/3] prctl.2, proc.5: document arm alignment trap via /proc/apu/alignment Shawn Landden
     [not found]     ` <1344113204-4294-3-git-send-email-shawnlandden-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-08-04 21:24       ` shawn
2012-08-04 21:41       ` shawn
2012-08-06  6:18       ` [PATCH 1/4] prctl.2: document new seccomp options Shawn Landden
     [not found]         ` <1344233940-2680-1-git-send-email-shawnlandden-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-08-06  6:18           ` [PATCH 2/4] prctl.2: document PR_GET_TIMESLACK and PR_SET_TIMESLACK Shawn Landden
2012-08-06  6:18           ` [PATCH 3/4] prctl.2, proc.5: document arm alignment trap via /proc/apu/alignment Shawn Landden
2012-08-06  6:19           ` [PATCH 4/4] prctl.2: document PR_SET_PTRACER Shawn Landden
     [not found]             ` <1344233940-2680-4-git-send-email-shawnlandden-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-08-09 19:09               ` [PATCH] prctl.2: PR_{SET,GET}_CHILD_SUBREAPER shawnlandden-Re5JQEeQqe8AvxtiuMwx3w
     [not found]                 ` <50240ad3.6ae4440a.5977.ffffc0ce-ATjtLOhZ0NVl57MIdRCFDg@public.gmane.org>
2013-01-10 22:51                   ` Michael Kerrisk (man-pages)
     [not found]                     ` <CAKgNAkj3=v7uYEj7EBYnEbAJU6E_9Vh6Civn-VLWXsjJgJ=QSA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-01-11 12:22                       ` Kay Sievers
2013-01-11 16:00                       ` Lennart Poettering
     [not found]                         ` <20130111160047.GA30380-kS5D54t9nk0aINubkmmoJbNAH6kLmebB@public.gmane.org>
2013-02-06 18:33                           ` Shawn Landden
     [not found]                             ` <1360175589-3667-1-git-send-email-shawnlandden-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-02-08  9:35                               ` Michael Kerrisk (man-pages)
     [not found]                                 ` <CAKgNAkiSDk87FwgRJ2BZmH+s-qvHk+4mg0jmxar1kMbSLSLUEw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-02-08 16:05                                   ` Lennart Poettering [this message]
     [not found]                                     ` <20130208160556.GB2902-kS5D54t9nk0aINubkmmoJbNAH6kLmebB@public.gmane.org>
2013-02-08 20:10                                       ` Michael Kerrisk (man-pages)
2013-01-11 10:30               ` [PATCH 4/4] prctl.2: document PR_SET_PTRACER Michael Kerrisk (man-pages)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130208160556.GB2902@tango.0pointer.de \
    --to=lennart-mdgvqq1h2p+gdvjs77bj7q@public.gmane.org \
    --cc=kay-tD+1rO4QERM@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=oleg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=shawnlandden-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.