Re: [PATCH v5 0/6] pidfd: add CLONE_AUTOREAP, CLONE_NNP, and CLONE_PIDFD_AUTOKILL

From: Christian Brauner

Date: Mon Mar 02 2026 - 05:41:30 EST


On Sat, Feb 28, 2026 at 01:49:56PM +0100, Oleg Nesterov wrote:
> On 02/26, Christian Brauner wrote:
> >
> > Christian Brauner (6):
> > clone: add CLONE_AUTOREAP
> > clone: add CLONE_NNP
> > pidfd: add CLONE_PIDFD_AUTOKILL
>
> Well, I still think copy_process should deny
> "CLONE_PARENT && current->signal->autoreap", in shis case the
> new child will have .exit_signal == 0 without signal->autoreap.
> But this really minor.

Sorry, my bad. I've added:

if ((clone_flags & CLONE_PARENT) && current->signal->autoreap)
return ERR_PTR(-EINVAL);