st/xa: replace call to dup(2) with fcntl(F_DUPFD_CLOEXEC)
authorMatt Whitlock <freedesktop@mattwhitlock.name>
Sun, 2 Oct 2016 03:49:44 +0000 (23:49 -0400)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 4 Oct 2016 09:09:01 +0000 (11:09 +0200)
commitac6064f91898065c8b82255190a0508204d3f88c
treeeaad9dd27a19d5002ed320b8db8c0d82e9ebd6be
parent0c060f691c0827b0a66e97a4a7f54385de14cdb8
st/xa: 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/state_trackers/xa/xa_tracker.c