Re: [PATCH 3/4] tty: Iterate only thread group leaders in __do_SAK()

From: Oleg Nesterov
Date: Thu Jan 11 2018 - 13:34:26 EST


On 01/11, Kirill Tkhai wrote:
>
> Since threads can't have additional fd in comparison
> to thread group leader
...
> as they definitely have the same
> files struct, as thread group leader.

Hmm. Why? Iirc CLONE_THREAD doesn't require CLONE_FILES?

Also. The group leader can exit, in this case its ->files == NULL
but other threads can be alive.

Oleg.