mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christian Brauner <brauner@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>, Jann Horn <jannh@google.com>,
	 Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	 linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH RFC 0/2] pidfd: add CLONE_AUTOREAP
Date: Tue, 17 Feb 2026 09:16:18 +0100	[thread overview]
Message-ID: <20260217-ruder-mietvertrag-1f48c75ea965@brauner> (raw)
In-Reply-To: <CAHk-=wj8Jp-JZRQsLaOGCWYb_qjsnHZUsdSfRpkwJOsjJozfGQ@mail.gmail.com>

On Mon, Feb 16, 2026 at 07:25:48AM -0800, Linus Torvalds wrote:
> On Mon, 16 Feb 2026 at 05:49, Christian Brauner <brauner@kernel.org> wrote:
> >
> > CLONE_AUTOREAP requires CLONE_PIDFD because the process will never be
> > visible to wait().
> 
> This seems an unnecessary and counter-productive limitation.
> 
> The very *traditional* unix way to do auto-reaping is to fork twice,
> and have the "middle" parent just exit.
> 
> That makes the final child be re-parented to init, and it is invisible
> to wait() - all very much on purpose.
> 
> This was (perhaps still is?) very commonly used for starting up
> background daemons (together with disassociating from the tty etc).
> 
> So I don't mind th enew flag, but I think the restriction is
> unnecessary and not logical. Sometimes you simply don't *want*
> processes visible to wait - or care about a pidfd.

I'm completely fine removing that restriction and supporting autoreap
without pidfd.

      reply	other threads:[~2026-02-17  8:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-16 13:48 Christian Brauner
2026-02-16 13:48 ` [PATCH RFC 1/2] clone: " Christian Brauner
2026-02-16 13:48 ` [PATCH RFC 2/2] selftests/pidfd: add CLONE_AUTOREAP tests Christian Brauner
2026-02-16 15:25 ` [PATCH RFC 0/2] pidfd: add CLONE_AUTOREAP Linus Torvalds
2026-02-17  8:16   ` Christian Brauner [this message]

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=20260217-ruder-mietvertrag-1f48c75ea965@brauner \
    --to=brauner@kernel.org \
    --cc=jannh@google.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®