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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 08, 2024 at 03:06:10PM +0100, Oleg Nesterov wrote:
> On 02/08, Christian Brauner wrote:
> >
> > I would also suggest we update the obsolete comment on top of
> > pidfd_send_signal() along the lines of:
> 
> Yes, but...
> 
> > + * If the @pidfd refers to a thread-group leader the signal is thread-group
> > + * directed. If @pidfd referes to a thread then the signal is thread directed.
> 
> No, this depends on PIDFD_THREAD only.

Sorry, yes, that is what I meant to say but obviously wrote unclearly. I
mean that if pidfd->f_flags & PIDFD_THREAD then it's thread-directed.
That's what I meant by type of pidfd. Not type as in PIDTYPE_PID in
struct pid.

> 
> If it is set then the signal is always "thread directed" even if @pidfd refers
> to a thread-group leader.
> 
> Otherwise the target task must be a group leader and the signal will be
> "thread-group directed".
> 
> Right?

Yes, please feel free to update the comment!




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux