Thread (32 messages) flat view 32 messages, 3 authors, 2024-02-21

Re: [PATCH v2 2/2] pidfd: change pidfd_send_signal() to respect PIDFD_THREAD

From: Oleg Nesterov <oleg@redhat.com>
Date: 2024-02-10 16:52:57
Also in: lkml

On 02/10, Christian Brauner wrote:
On Sat, Feb 10, 2024 at 02:15:18PM +0100, Oleg Nesterov wrote:
quoted
On 02/10, Christian Brauner wrote:
quoted
The question is what is more useful for userspace when they do:
pidfd_send_signal(1234, PIDFD_SEND_PROCESS_GROUP)?

(1) They either mean to signal a process group that is headed by 1234.
Yes, this is what I had in mind, see also another email from me.
Simple, clear, and matches kill(-1234).
I went for a walk and kept thinking about this and I agree with you.
It will require that 1234 will be a process group leader but I think
that this is ok to require that.
Yes... but I am starting to understand why you mentioned the new
open PIDFD_PROCESS_GROUP flag... perhaps we can do something like
this later, but this needs more thinking.
+	if (type == PIDFD_SIGNAL_PROCESS_GROUP)
+		ret = kill_pgrp_info(sig, &kinfo, pid);
I guess you meant

	if (type == PIDTYPE_PGID)

other than that,

Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help