From 6269405a2bafadd8aec495da8352fb888d7e6c6f Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Fri, 5 Jun 2020 10:55:41 +0200 Subject: [PATCH] virgl: 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/virgl/drm/virgl_drm_winsys.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c index 01ca1018172..c6cc99bbe0e 100644 --- a/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c +++ b/src/gallium/winsys/virgl/drm/virgl_drm_winsys.c @@ -664,7 +664,7 @@ virgl_drm_fence_create(struct virgl_winsys *vws, int fd, bool external) assert(vws->supports_fences); if (external) { - fd = dup(fd); + fd = os_dupfd_cloexec(fd); if (fd < 0) return NULL; } @@ -891,7 +891,7 @@ static int virgl_fence_get_fd(struct virgl_winsys *vws, if (!vws->supports_fences) return -1; - return dup(fence->fd); + return os_dupfd_cloexec(fence->fd); } static int virgl_drm_get_version(int fd) -- 2.30.2