iris: replace all dup() with os_dupfd_cloexec()
[mesa.git] / src / gallium / drivers / iris / iris_bufmgr.c
index 5529d3767dac3145fd4aa27dceb804de9289ba21..e6b5c9763b5110b7a2f8d5c13ae6da8fcf5a2983 100644 (file)
@@ -1801,7 +1801,7 @@ iris_bufmgr_create(struct gen_device_info *devinfo, int fd, bool bo_reuse)
     * Don't do this! Ensure that each library/bufmgr has its own device
     * fd so that its namespace does not clash with another.
     */
-   bufmgr->fd = dup(fd);
+   bufmgr->fd = os_dupfd_cloexec(fd);
 
    p_atomic_set(&bufmgr->refcount, 1);