From: Jonathan Rajotte Date: Mon, 2 Mar 2020 19:21:33 +0000 (-0500) Subject: Fix: set FD_CLOEXEC on incoming FDs. X-Git-Url: http://drtracing.org/?a=commitdiff_plain;ds=sidebyside;h=18ef3e51fcd38bc6ca0f67fa23559186eba8fb33;hp=18ef3e51fcd38bc6ca0f67fa23559186eba8fb33;p=deliverable%2Flttng-ust.git Fix: set FD_CLOEXEC on incoming FDs. The stream shm FDs are allocated by the consumer process, and then passed to the applications over unix sockets. When opening those file descriptors on reception, the FD_CLOEXEC flag is not set. In a fork + exec scenario, parent process streams shm FDs and channel wake FDs are present in the resulting child process. Set FD_CLOEXEC on reception (ustcomm_recv_fds_unix_sock) to prevent such scenario. Change-Id: Id58077b272be9c1ab239846639ffd8103b3d50f1 Signed-off-by: Jonathan Rajotte Signed-off-by: Mathieu Desnoyers ---