Re: [PATCH 1/4] pidfd: support PIDFD_NONBLOCK in pidfd_open()

From: Oleg Nesterov
Date: Tue Sep 01 2020 - 12:23:40 EST


On 08/31, Christian Brauner wrote:
>
> --- /dev/null
> +++ b/include/uapi/linux/pidfd.h
> @@ -0,0 +1,12 @@
> +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
> +
> +#ifndef _UAPI_LINUX_PIDFD_H
> +#define _UAPI_LINUX_PIDFD_H
> +
> +#include <linux/types.h>
> +#include <linux/fcntl.h>
> +
> +/* Flags for pidfd_open(). */
> +#define PIDFD_NONBLOCK O_NONBLOCK
> +
> +#endif /* _UAPI_LINUX_PIDFD_H */

Why? Can't we simply use O_NONBLOCK ?

Oleg.