[PATCH weston 07/17] evdev: open input devices as close-on-exec

Pekka Paalanen ppaalanen at gmail.com
Thu Jul 5 03:33:04 PDT 2012


Like we do for all other files, too.

Signed-off-by: Pekka Paalanen <ppaalanen at gmail.com>
---
 src/udev-evdev.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/udev-evdev.c b/src/udev-evdev.c
index a19db92..426cb47 100644
--- a/src/udev-evdev.c
+++ b/src/udev-evdev.c
@@ -63,7 +63,7 @@ device_added(struct udev_device *udev_device, struct uevdev_seat *master)
 	/* Use non-blocking mode so that we can loop on read on
 	 * evdev_input_device_data() until all events on the fd are
 	 * read.  mtdev_get() also expects this. */
-	fd = weston_launcher_open(c, devnode, O_RDWR | O_NONBLOCK);
+	fd = weston_launcher_open(c, devnode, O_RDWR | O_NONBLOCK | O_CLOEXEC);
 	if (fd < 0) {
 		weston_log("opening input device '%s' failed.\n", devnode);
 		return;
-- 
1.7.8.6



More information about the wayland-devel mailing list