From patchwork Wed Jun 29 07:04:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 16413 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 5EDCBBE173 for ; Wed, 29 Jun 2022 07:04:54 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id F095565645; Wed, 29 Jun 2022 09:04:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1656486294; 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=D0/hisNpM7dd3Bm8mvJKMX/QSM4pMjhRD9PjyVY/S/xWACufPERYZJP09tkETPV67 lNyaXutDMlwEmPt2jh51XveanvZ6mXiYa3Gv2lC5OMt2veOr0rYAd6aZvg4CcO31v9 ObzD3iY7IiAF1PihmwpFajUIpA7uGmwTd/KJOwBtMFTpDkOvoJYmDzNBlvEXBjxkZQ C6VVXr8yPbtPTVTamATFOH91r7eSiBOMJgKfkyjb9hezAKJanjoAGmmRZTukq8gunf jQuLDHC/yjh3fHSZKwQq9NkJY4ro7cdoQPYOMA2NQzfyANcetnLAVQBc/aLRslK5e8 rWfyyVPuMAkDQ== 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 1F95565641 for ; Wed, 29 Jun 2022 09:04:44 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="dZ9Cgfws"; 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 7D7AA4A8; Wed, 29 Jun 2022 09:04:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1656486283; bh=4jssbuxUq5C1GVY59JXBlIIcwKau4KEUhfDWEvwAuHc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dZ9CgfwsABD0N+ObVGsmZ5IhmcgBCoFb4SqnwM6jlcDePEm42Jz+BH+VQ3q6Y6Vou xT5ri3lGiScPLB5e5fHIQroEuL6zZ0/Mb7wLrxgmbHYJit2RSQcZnYTNZKGc1VOa+L EyQfJvW8WIwqT5laE9mb6XAIbW0mLEPaKddfUkFQ= To: libcamera-devel@lists.libcamera.org, David Plowman , Kieran Bingham , Laurent Pinchart , Jacopo Mondi Date: Wed, 29 Jun 2022 10:04:09 +0300 Message-Id: <20220629070416.17550-8-tomi.valkeinen@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220629070416.17550-1-tomi.valkeinen@ideasonboard.com> References: <20220629070416.17550-1-tomi.valkeinen@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 07/14] 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 --- 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");