From 526910e8faa95f844a60af743beb904f666972e1 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Fri, 5 Jun 2020 10:55:35 +0200 Subject: [PATCH] svga: replace all dup() with os_dupfd_cloexec() Signed-off-by: Eric Engestrom Reviewed-by: Kristian H. Kristensen Reviewed-by: Lionel Landwerlin Part-of: --- src/gallium/winsys/svga/drm/vmw_screen_svga.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gallium/winsys/svga/drm/vmw_screen_svga.c b/src/gallium/winsys/svga/drm/vmw_screen_svga.c index 38ef3bcb9fe..334adde7b31 100644 --- a/src/gallium/winsys/svga/drm/vmw_screen_svga.c +++ b/src/gallium/winsys/svga/drm/vmw_screen_svga.c @@ -37,6 +37,7 @@ #include "svga_cmd.h" #include "svga3d_caps.h" +#include "util/os_file.h" #include "util/u_inlines.h" #include "util/u_math.h" #include "util/u_memory.h" @@ -143,7 +144,7 @@ vmw_svga_winsys_fence_get_fd(struct svga_winsys_screen *sws, boolean duplicate) { if (duplicate) - return dup(vmw_fence_get_fd(fence)); + return os_dupfd_cloexec(vmw_fence_get_fd(fence)); else return vmw_fence_get_fd(fence); } @@ -154,7 +155,7 @@ vmw_svga_winsys_fence_create_fd(struct svga_winsys_screen *sws, struct pipe_fence_handle **fence, int32_t fd) { - *fence = vmw_fence_create(NULL, 0, 0, 0, dup(fd)); + *fence = vmw_fence_create(NULL, 0, 0, 0, os_dupfd_cloexec(fd)); } static int -- 2.30.2