From: Eric Engestrom Date: Fri, 5 Jun 2020 08:55:41 +0000 (+0200) Subject: virgl: replace all dup() with os_dupfd_cloexec() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6269405a2bafadd8aec495da8352fb888d7e6c6f;p=mesa.git virgl: replace all dup() with os_dupfd_cloexec() Signed-off-by: Eric Engestrom Reviewed-by: Kristian H. Kristensen Reviewed-by: Lionel Landwerlin Part-of: --- 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)