From patchwork Fri Aug 19 11:16:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 17179 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 88EFBBE173 for ; Fri, 19 Aug 2022 11:16:37 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3AC1861FCC; Fri, 19 Aug 2022 13:16:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1660907797; bh=Ir9yWG2QFohno8uY8JuMwSpSfHmYnKcYj2mKDrRB6wU=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=Q9qc/ApeSv0ybcv9g9KIvoMmmTg94iC43d+w51/FtTukUzcOkwIkicoiY+XwqSD1U voNic79mOwFAyDVPzWA/Oo7eGo8lA8NGsg9EXAueC/cD0S7Hu6HTdlyl6SpuNUMDLM mJcKe8t0/aaMUI4aEBdedkZFx3yV9avLIFYMrulgwwi3129ehGXUF8ALVZKYxQiu58 Qh03yUrBn1K2RIYZFT3hLEzM0RUSTCOAEnub8lVTXOCkMPHCH+erwob2P/pmjUH4pL hfHLKwPW7W552gNO47fogI3LWI2ry999CpFEyWlQG6l9d1xeLEaAikm/2LoEbnJtZn ASmNYV1czn6DQ== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 41F0061FA4 for ; Fri, 19 Aug 2022 13:16:32 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="knfLlvU6"; dkim-atps=neutral Received: from deskari.lan (91-158-154-79.elisa-laajakaista.fi [91.158.154.79]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id ADA583F1; Fri, 19 Aug 2022 13:16:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1660907792; bh=Ir9yWG2QFohno8uY8JuMwSpSfHmYnKcYj2mKDrRB6wU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=knfLlvU62q9qWGEWNkst7XjBIGRe7bLGqCDMwQI0mJkT1cAFAue4czZglo4kikx2h QEe7Uj9LPY65bAKYvy2L/eo5wZB4quUK6X4dM4JgiRkCKoYHO9ge6e4Y1YfMovVf2Q cqtNi8ke9HQ1cpBr8pVZZDlFxa9QDp0YzvUAEQ9U= To: libcamera-devel@lists.libcamera.org, David Plowman , Kieran Bingham , Laurent Pinchart , Jacopo Mondi Date: Fri, 19 Aug 2022 14:16:13 +0300 Message-Id: <20220819111615.39814-5-tomi.valkeinen@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220819111615.39814-1-tomi.valkeinen@ideasonboard.com> References: <20220819111615.39814-1-tomi.valkeinen@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 4/6] py: Set EFD_CLOEXEC on eventfd to avoid fd leaking X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tomi Valkeinen via libcamera-devel From: Tomi Valkeinen Reply-To: Tomi Valkeinen Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Set EFD_CLOEXEC on eventfd to avoid fd leaking. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- src/py/libcamera/py_camera_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/py/libcamera/py_camera_manager.cpp b/src/py/libcamera/py_camera_manager.cpp index 18fdb623..8bfb8e57 100644 --- a/src/py/libcamera/py_camera_manager.cpp +++ b/src/py/libcamera/py_camera_manager.cpp @@ -24,7 +24,7 @@ PyCameraManager::PyCameraManager() cameraManager_ = std::make_unique(); - int fd = eventfd(0, 0); + int fd = eventfd(0, EFD_CLOEXEC); if (fd == -1) throw std::system_error(errno, std::generic_category(), "Failed to create eventfd");