From 63ff706c0e00f9e583f5c8a4b220981772a62658 Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Sat, 5 Nov 2011 18:46:01 +0100 Subject: [PATCH] compositor-drm: Fix setting O_CLOEXEC The third parameter of open() is for file-creation modes. File flags are passed in the second paramater. Signed-off-by: David Herrmann --- compositor/compositor-drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compositor/compositor-drm.c b/compositor/compositor-drm.c index 02214f595..855a811ee 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",