All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Kay Sievers <kay.sievers@vrfy.org>
Cc: linux-kernel@vger.kernel.org,
	Lennart Poettering <lennart@poettering.net>
Subject: Re: [PATCH] prctl: add PR_{SET,GET}_CHILD_REAPER to allow simple process supervision
Date: Tue, 16 Aug 2011 13:10:10 -0700	[thread overview]
Message-ID: <20110816131010.7a6e9a99.akpm@linux-foundation.org> (raw)
In-Reply-To: <1311897706.16657.2.camel@mop>

On Fri, 29 Jul 2011 02:01:44 +0200
Kay Sievers <kay.sievers@vrfy.org> wrote:

> From: Lennart Poettering <lennart@poettering.net>
> Subject: prctl: add PR_{SET,GET}_CHILD_REAPER to allow simple process supervision
> 
> Userspace service managers/supervisors need to track their started
> services. Many services daemonize by double-forking and get implicitely
> re-parented to PID 1. The process manager will no longer be able to
> receive the SIGCHLD signals for them.
> 
> With this prctl, a service manager can mark itself as a sort of
> 'sub-init' process, able to stay as the parent process for all processes
> created by the started services. All SIGCHLD signals will be delivered
> to the service manager.
> 
> As a side effect, the relevant parent PID information does not get lost
> by a double-fork, which results in a more elaborate process tree and 'ps'
> output.
> 
> This is orthogonal to PID namespaces. PID namespaces are isolated
> from each other, while a service management process usually requires
> the serices to live in the same namespace, to be able to talk to each
> other.
> 
> Users of this will be the systemd per-user instance, which provides
> init-like functionality for the user's login session and D-Bus, which
> activates bus services on on-demand. Both will need init-like capabilities
> to be able to properly keep track of the services they start.
> 

Interesting patch.  I can't immediately see any nasty effects from it..

Did you consider using the existing taskstats capability for this?

The comment block over find_new_reaper() is now incomplete.  Please
update it?

prctl(2) has a manpage.  What's the plan for updating it?


  parent reply	other threads:[~2011-08-16 20:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-29  0:01 [PATCH] prctl: add PR_{SET,GET}_CHILD_REAPER to allow simple process supervision Kay Sievers
2011-08-16 13:43 ` Kay Sievers
2011-08-16 20:10 ` Andrew Morton [this message]
2011-08-17  0:32   ` Kay Sievers
2011-08-17  0:45     ` Andrew Morton

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=20110816131010.7a6e9a99.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=kay.sievers@vrfy.org \
    --cc=lennart@poettering.net \
    --cc=linux-kernel@vger.kernel.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.