[PATCH weston] compositor-drm: Open drm device with CLOEXEC

Derek Foreman derekf at osg.samsung.com
Fri May 1 07:59:55 PDT 2015


Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
---
 src/compositor-drm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index 43197a8..6a2dbd9 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -1329,7 +1329,8 @@ init_drm(struct drm_compositor *ec, struct udev_device *device)
 	}
 
 	filename = udev_device_get_devnode(device);
-	fd = weston_launcher_open(ec->base.launcher, filename, O_RDWR);
+	fd = weston_launcher_open(ec->base.launcher, filename,
+				  O_RDWR | O_CLOEXEC);
 	if (fd < 0) {
 		/* Probably permissions error */
 		weston_log("couldn't open %s, skipping\n",
-- 
2.1.4



More information about the wayland-devel mailing list