diff options
author | Eric Engestrom <[email protected]> | 2020-06-05 10:55:22 +0200 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-06-18 02:09:56 +0000 |
commit | 69269a46f10f4ad67452a198fe6381953444d741 (patch) | |
tree | 4c293f5cca07f11672725e40075a72230863a424 | |
parent | 4a8085d67ca7b41690edf22c410e4dc0a28e3187 (diff) |
vulkan/wsi: 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>
-rw-r--r-- | src/vulkan/wsi/wsi_common.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vulkan/wsi/wsi_common.c b/src/vulkan/wsi/wsi_common.c index 7df24a61603..d9906091ed9 100644 --- a/src/vulkan/wsi/wsi_common.c +++ b/src/vulkan/wsi/wsi_common.c @@ -24,6 +24,7 @@ #include "wsi_common_private.h" #include "drm-uapi/drm_fourcc.h" #include "util/macros.h" +#include "util/os_file.h" #include "util/xmlconfig.h" #include "vk_util.h" @@ -621,7 +622,7 @@ wsi_create_native_image(const struct wsi_swapchain *chain, if (p == 0) { image->fds[p] = fd; } else { - image->fds[p] = dup(fd); + image->fds[p] = os_dupfd_cloexec(fd); if (image->fds[p] == -1) { for (uint32_t i = 0; i < p; i++) close(image->fds[i]); |