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 13:16:42
Also in: lkml

On 02/10, Christian Brauner wrote:
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).
(2) Or they want to signal a process group of which 1234 is a member or
    the leader.
Somehow I didn't even consider this option when I thought about
PIDFD_SIGNAL_PGRP...
From a usability perspective (1) is a lot more restrictive because it
requires @pidfd to refer to a process group leader.
Yes, but to be honest (2) doesn't fit my head. Probably simply because
I always had (1) in mind...

But I won't argue if you think that (2) has useful usecases.

Oleg.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help