From patchwork Thu Apr 24 11:21:53 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: 23242 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 C25C4C327D for ; Thu, 24 Apr 2025 11:22:10 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C4C1D68AD4; Thu, 24 Apr 2025 13:22:08 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="IfMix3uQ"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id AF8C968AC5 for ; Thu, 24 Apr 2025 13:22:06 +0200 (CEST) Received: from pb-laptop.local (185.221.143.16.nat.pool.zt.hu [185.221.143.16]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 8C798F01 for ; Thu, 24 Apr 2025 13:22:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1745493724; bh=RSBRPvCtW4thAs7FHnInwnxNANdFNEkfkjuaPoVM6pg=; h=From:To:Subject:Date:From; b=IfMix3uQTSrZTiX+X00gHHglvdJf4DUbnIaYN1Ff1S5H33Or1vDuTkNFQ/jUZUdnV ruiDo4PH42InpDZ8Gk2pHvo3UpMLWaMSSl706fZgH9ATPlveUS8hEIudOTl7FOOHei TXOunfSrdKUcqLf9CFPnhAeomROq36Klly6JERrQ= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Subject: [RFC PATCH v4 0/9] libcamera: process: Remove `ProcessManager` singleton Date: Thu, 24 Apr 2025 13:21:53 +0200 Message-ID: <20250424112203.445351-1-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.49.0 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 v4: * address review comments 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 (9): libcamera: process: Disable copy/move libcamera: process: Misc. cleanup around `execv()` libcamera: process: Use `pid_` member to decide if running libcamera: process: Return error if already running libcamera: process: Ensure that file descriptors are nonnegative libcamera: process: Use span instead of vector 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 | 45 +-- meson.build | 6 +- src/libcamera/ipc_pipe_unixsocket.cpp | 9 +- src/libcamera/process.cpp | 313 +++++++------------- test/ipc/unixsocket_ipc.cpp | 2 - test/log/log_process.cpp | 2 - test/process/process_test.cpp | 7 +- 8 files changed, 125 insertions(+), 260 deletions(-) --- 2.49.0