util: introduce os_dupfd_cloexec() helper
authorEric Engestrom <eric@engestrom.ch>
Thu, 4 Jun 2020 23:08:33 +0000 (01:08 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 18 Jun 2020 02:09:56 +0000 (02:09 +0000)
commit0e5ea7a36399815a2e39b72f3f0e3a75c44c062d
tree0ec83d18caa7ed6f28f4912d55fe7f343cb2ea37
parentb00e1d9ea77a409cc15e57568284d48bdb9443c2
util: introduce os_dupfd_cloexec() helper

Adapted from wayland's wl_os_dupfd_cloexec().

Suggested-by: Kristian H. Kristensen <hoegsberg@google.com>
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>
src/util/os_file.c
src/util/os_file.h