From patchwork Fri Jul 1 08:45:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 16499 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 DEFD3BD808 for ; Fri, 1 Jul 2022 08:45:51 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id BDE1765662; Fri, 1 Jul 2022 10:45:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1656665151; bh=4jssbuxUq5C1GVY59JXBlIIcwKau4KEUhfDWEvwAuHc=; 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=zNJtsdU3luPxDfdTCVNynzzZSCzkq54Xw6/WnxnLgHfeIrwnzGyA2Zry8avA2P3ja 7XdOYbD/1qJbrx/Ty//6S5wzr8iSXy8MMFuAip8xhKxhmgznvrxgvDR3+zbNAwbeOh oduZiTcbJf+UhxDE8+f14rQy/S8wC0+ojPVUkaHKLaTIg8ywY7WwJHP92Ip4437BL1 GxiscMTQKwmpqWOMRP/Q/NU5/6H1dNNNt3GtoMSHuLzkLoDRTHWhFMflj4Pym8r6Hg dVLhCYLr4C88h+Ovk7pRauFN6JahW0xoaPaH2h6pEYSzzQA/FolUchSGuJK8nLxO7w URbbIuLAJMj1w== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0A52265659 for ; Fri, 1 Jul 2022 10:45:44 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="L5aYaAx9"; 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 710DF25C; Fri, 1 Jul 2022 10:45:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1656665143; bh=4jssbuxUq5C1GVY59JXBlIIcwKau4KEUhfDWEvwAuHc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L5aYaAx9Q2T+ChYL315NXL8Ki06PTyUCKsKuV8NvT6amCKfsotOxlkByvXuYTF4/Y Hu+rfMTo6TSe0XWzledVtEwygt1LMIEH+cDLJ5sobKfHT2XO9wEt0KSUBepymUDIGa rFbcQgG6CyxuXN0ltmzRIZDOPmTqzOzwtpiWORH0= To: libcamera-devel@lists.libcamera.org, David Plowman , Kieran Bingham , Laurent Pinchart , Jacopo Mondi Date: Fri, 1 Jul 2022 11:45:11 +0300 Message-Id: <20220701084521.31831-8-tomi.valkeinen@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220701084521.31831-1-tomi.valkeinen@ideasonboard.com> References: <20220701084521.31831-1-tomi.valkeinen@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 07/17] 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 51a890c8..3d422c9e 100644 --- a/src/py/libcamera/py_camera_manager.cpp +++ b/src/py/libcamera/py_camera_manager.cpp @@ -22,7 +22,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");