[PATCH weston 2/2] input: Set CLOEXEC on all opened fds
David Herrmann
dh.herrmann at gmail.com
Thu Apr 30 09:27:57 PDT 2015
Hi
On Thu, Apr 30, 2015 at 6:20 PM, Derek Foreman <derekf at osg.samsung.com> wrote:
> We'd rather not have these fds available in all child processes, even
> if using old versions of libinput that don't bother to set CLOEXEC
>
> Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
Reviewed-by: David Herrmann <dh.herrmann at gmail.com>
Thanks
David
> ---
> src/libinput-seat.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/libinput-seat.c b/src/libinput-seat.c
> index c0a87ea..6eae1a4 100644
> --- a/src/libinput-seat.c
> +++ b/src/libinput-seat.c
> @@ -186,7 +186,7 @@ open_restricted(const char *path, int flags, void *user_data)
> struct udev_input *input = user_data;
> struct weston_launcher *launcher = input->compositor->launcher;
>
> - return weston_launcher_open(launcher, path, flags);
> + return weston_launcher_open(launcher, path, flags | O_CLOEXEC);
> }
>
> static void
> --
> 2.1.4
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list