projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vulkan/wsi: replace all dup() with os_dupfd_cloexec()
[mesa.git]
/
src
/
vulkan
/
wsi
/
wsi_common.c
diff --git
a/src/vulkan/wsi/wsi_common.c
b/src/vulkan/wsi/wsi_common.c
index 7df24a616032ecfac706da91e70b7e6ac27db43a..d9906091ed9528d944cc18f9aee1a4ad68f6941b 100644
(file)
--- 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 "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"
#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 {
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]);
if (image->fds[p] == -1) {
for (uint32_t i = 0; i < p; i++)
close(image->fds[i]);