# Re: \[PATCH v2 4/5\] signal: support CLONE\_PIDFD with pidfd\_send\_signal

- From: Oleg Nesterov \<oleg@redhat.com\>
- Date: 2019-04-18 14:26:07 
- List: linux-api
- Page: https://ratatoskr.run/linux-api/2019/04/5573595
- Thread: https://ratatoskr.run/linux-api/2019/04/5573331/t.md

```text
On 04/18, Christian Brauner wrote:
>
> +static struct pid *pidfd_to_pid(const struct file *file)
> +{
> +	if (file->f_op == &pidfd_fops)
> +		return file->private_data;
> +
> +	return tgid_pidfd_to_pid(file);
> +}

the patch looks obviously fine to me, but I have an absolutely off-topic
question... why tgid_pidfd_to_pid() has to check d_is_dir() ?

Oleg.
```
