[PATCH] compositor-drm: Fix setting O_CLOEXEC
Kristian Høgsberg
krh at bitplanet.net
Sat Nov 5 19:10:12 PDT 2011
On Sat, Nov 5, 2011 at 1:46 PM, David Herrmann
<dh.herrmann at googlemail.com> wrote:
> The third parameter of open() is for file-creation modes. File flags are passed
> in the second paramater.
Wow, that's just awfully embarassing. Thanks, applied.
Kristian
> Signed-off-by: David Herrmann <dh.herrmann at googlemail.com>
> ---
> compositor/compositor-drm.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/compositor/compositor-drm.c b/compositor/compositor-drm.c
> index 02214f5..855a811 100644
> --- a/compositor/compositor-drm.c
> +++ b/compositor/compositor-drm.c
> @@ -322,7 +322,7 @@ init_egl(struct drm_compositor *ec, struct udev_device *device)
> };
>
> filename = udev_device_get_devnode(device);
> - fd = open(filename, O_RDWR, O_CLOEXEC);
> + fd = open(filename, O_RDWR | O_CLOEXEC);
> if (fd < 0) {
> /* Probably permissions error */
> fprintf(stderr, "couldn't open %s, skipping\n",
> --
> 1.7.7.2
>
>
More information about the wayland-devel
mailing list