[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190725103543.GF4707@redhat.com>
Date: Thu, 25 Jul 2019 12:35:44 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Christian Brauner <christian@...uner.io>
Cc: linux-kernel@...r.kernel.org, arnd@...db.de, ebiederm@...ssion.com,
keescook@...omium.org, joel@...lfernandes.org, tglx@...utronix.de,
tj@...nel.org, dhowells@...hat.com, jannh@...gle.com,
luto@...nel.org, akpm@...ux-foundation.org, cyphar@...har.com,
torvalds@...ux-foundation.org, viro@...iv.linux.org.uk,
kernel-team@...roid.com, Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
linux-api@...r.kernel.org
Subject: Re: [PATCH 4/5] pidfd: add CLONE_WAIT_PID
On 07/24, Christian Brauner wrote:
>
> If CLONE_WAIT_PID is set the newly created process will not be
> considered by process wait requests that wait generically on children
> such as:
I have to admit this feature looks a bit exotic to me...
> --- a/kernel/exit.c
> +++ b/kernel/exit.c
> @@ -1019,6 +1019,9 @@ eligible_child(struct wait_opts *wo, bool ptrace, struct task_struct *p)
> if (!eligible_pid(wo, p))
> return 0;
>
> + if ((p->flags & PF_WAIT_PID) && (wo->wo_type != PIDTYPE_PID))
> + return 0;
Even if ptrace == T ?
This doesn't look right. Say, strace should work even if its tracee (or
one of the tracees) has PF_WAIT_PID.
Oleg.
Powered by blists - more mailing lists