Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5369>
assert(vws->supports_fences);
if (external) {
- fd = dup(fd);
+ fd = os_dupfd_cloexec(fd);
if (fd < 0)
return NULL;
}
if (!vws->supports_fences)
return -1;
- return dup(fence->fd);
+ return os_dupfd_cloexec(fence->fd);
}
static int virgl_drm_get_version(int fd)