From patchwork Mon Jul 28 11:36:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 23990 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 A4647C3237 for ; Mon, 28 Jul 2025 11:36:49 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8F3726915F; Mon, 28 Jul 2025 13:36:47 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="ddan2Dd/"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9D8FC6904C for ; Mon, 28 Jul 2025 13:36:45 +0200 (CEST) Received: from pb-laptop.local (185.221.140.39.nat.pool.zt.hu [185.221.140.39]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 7C6224A4 for ; Mon, 28 Jul 2025 13:36:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1753702563; bh=5Xhi38LaSXAeo9z5+Uh8HE6vObEIRtA5dGdPqTAxrV8=; h=From:To:Subject:Date:From; b=ddan2Dd/GUzV9m6hwPr4qf0fNlLbY6RL80ssliDN6MMUTVD6DwnjqNynLCy1H3OSu q6UfXVuA2dUdsABhj/IuxNQP2Y7sqhAeItBXvfgjsPLAZxtUUwNC4tAIdXtdLmIIgZ OrWtnz53jM/Y4cqFkmLlWFgFcSxbXI9IxPtcO510= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Subject: [PATCH v6 0/6] libcamera: process: Remove `ProcessManager` singleton Date: Mon, 28 Jul 2025 13:36:35 +0200 Message-ID: <20250728113641.238256-1-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.50.1 MIME-Version: 1.0 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The main goal is to remove the need for the ProcessManager singleton. That is achieved by using pidfd + clone3(), which raises the minimum kernel version to 5.4. There are also additional misc. changes. --- changes in v6: * first couple patches merged * rebase changes in v5: * send the actually intended version... changes in v4: * address review comments v5: https://patchwork.libcamera.org/cover/23252/ v4: https://patchwork.libcamera.org/cover/23242/ v3: https://patchwork.libcamera.org/cover/23013/ v2: https://patchwork.libcamera.org/patch/22609/ v1: https://patchwork.libcamera.org/patch/22522/ Barnabás Pőcze (6): libcamera: process: Use `pid_` member to decide if running libcamera: process: start(): Use span instead of vector libcamera: process: closeAllFdsExcept(): Take vector by value libcamera: process: Move `closeAllFdsExcept()` libcamera: process: Use `close_range()` when available libcamera: process: Remove `ProcessManager` singleton include/libcamera/internal/camera_manager.h | 1 - include/libcamera/internal/process.h | 42 +-- meson.build | 6 +- src/libcamera/ipc_pipe_unixsocket.cpp | 9 +- src/libcamera/process.cpp | 304 +++++++------------- test/ipc/unixsocket_ipc.cpp | 2 - test/log/log_process.cpp | 2 - test/process/process_test.cpp | 7 +- 8 files changed, 113 insertions(+), 260 deletions(-) -- 2.50.1