egl: replace all dup() with os_dupfd_cloexec()
authorEric Engestrom <eric@engestrom.ch>
Fri, 5 Jun 2020 08:22:22 +0000 (10:22 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 18 Jun 2020 02:09:56 +0000 (02:09 +0000)
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5369>

src/egl/drivers/dri2/egl_dri2.c

index 2e51d28a8b99acc5306fba1684be9713d5bffcfc..5baa0c9b647e42a7c3691419350f7da417750231 100644 (file)
@@ -62,6 +62,7 @@
 #include "egl_dri2.h"
 #include "GL/mesa_glinterop.h"
 #include "loader/loader.h"
+#include "util/os_file.h"
 #include "util/u_atomic.h"
 #include "util/u_vector.h"
 #include "mapi/glapi/glapi.h"
@@ -3456,7 +3457,7 @@ dri2_dup_native_fence_fd(_EGLDriver *drv, _EGLDisplay *disp, _EGLSync *sync)
       return EGL_NO_NATIVE_FENCE_FD_ANDROID;
    }
 
-   return dup(sync->SyncFd);
+   return os_dupfd_cloexec(sync->SyncFd);
 }
 
 static void