diff options
author | Eric Engestrom <[email protected]> | 2020-06-05 10:55:35 +0200 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-06-18 02:09:56 +0000 |
commit | 526910e8faa95f844a60af743beb904f666972e1 (patch) | |
tree | 61aa13108ff43173a7a07a2c6e029b0e7b66cdca /src/gallium | |
parent | 9ca2a4e6fc9d059a024ba8da20891ccf79ba659d (diff) |
svga: replace all dup() with os_dupfd_cloexec()
Signed-off-by: Eric Engestrom <[email protected]>
Reviewed-by: Kristian H. Kristensen <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5369>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/winsys/svga/drm/vmw_screen_svga.c | 5 |
1 files 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 |