gallium/auxiliary: replace call to dup(2) with fcntl(F_DUPFD_CLOEXEC)
authorMatt Whitlock <freedesktop@mattwhitlock.name>
Sun, 2 Oct 2016 03:49:42 +0000 (23:49 -0400)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 4 Oct 2016 09:08:55 +0000 (11:08 +0200)
commit5d0069eca2c5e29ef9255f9b0e70d4daefd10ce8
treef570c8583e64f8b2cbd2510c70825d72d2241a61
parentc8fd7d060d000a89f08f690ec72349ab97ae41bc
gallium/auxiliary: replace call to dup(2) with fcntl(F_DUPFD_CLOEXEC)

Without this fix, duplicated file descriptors leak into child processes.
See commit aaac913e901229d11a1894f6aaf646de6b1a542c for one instance
where the same fix was employed.

Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Matt Whitlock <freedesktop@mattwhitlock.name>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/auxiliary/vl/vl_winsys_drm.c