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 <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann 2011-11-05 18:46:01 +01:00 committed by Kristian Høgsberg
parent bbe605241d
commit 63ff706c0e
1 changed files with 1 additions and 1 deletions

View File

@ -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",