Re: [PATCH RFC v3 2/4] pidfd: add CLONE_PIDFD_AUTOKILL

From: Oleg Nesterov

Date: Wed Feb 18 2026 - 06:51:23 EST


On 02/17, Christian Brauner wrote:
>
> @@ -2470,8 +2479,11 @@ __latent_entropy struct task_struct *copy_process(
> syscall_tracepoint_update(p);
> write_unlock_irq(&tasklist_lock);
>
> - if (pidfile)
> + if (pidfile) {
> + if (clone_flags & CLONE_PIDFD_AUTOKILL)
> + p->signal->autokill_pidfd = pidfile;
> fd_install(pidfd, pidfile);

Just curious... Instead of adding signal->autokill_pidfd, can't we
add another "not fcntl" PIDFD_AUTOKILL flag that lives in ->f_flags ?

Oleg.