egl: replace all dup() with os_dupfd_cloexec()

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>
This commit is contained in:
Eric Engestrom 2020-06-05 10:22:22 +02:00 committed by Marge Bot
parent 62797c30ed
commit 419b446e1e
1 changed files with 2 additions and 1 deletions

View 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