From patchwork Thu Apr 24 11:40:54 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: 23252 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 0B07AC327D for ; Thu, 24 Apr 2025 11:41:11 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CA06C68ADA; Thu, 24 Apr 2025 13:41:09 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="UwOkyl3m"; dkim-atps=neutral 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 461C068ACC for ; Thu, 24 Apr 2025 13:41:07 +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 E1CF7F01 for ; Thu, 24 Apr 2025 13:41:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1745494865; bh=LJ/uVHH/4VdrTBZ9Lra9dio0aABzsV2WrYg7Z6h9dJ0=; h=From:To:Subject:Date:From; b=UwOkyl3mNPL/x6VWjfbL8JbPZQPtQszbTJBqfVRdFvEbC5cPjOnTFe4rpDdkLTG6g C9yZupfV4QgcgfWzj7AHE0+kwIyZtCJFotfWoPhK4Ih87uoQC4u2UauSq7VfALZ6eP iGUmmCE4JrPqawDCZj96B/jMdLjEQ98zJTFbcisw= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Subject: [RFC PATCH v5 0/9] libcamera: process: Remove `ProcessManager` singleton Date: Thu, 24 Apr 2025 13:40:54 +0200 Message-ID: <20250424114103.451395-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 v5: * send the actually intended version... changes in v4: * address review comments 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 (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 | 312 +++++++------------- test/ipc/unixsocket_ipc.cpp | 2 - test/log/log_process.cpp | 2 - test/process/process_test.cpp | 7 +- 8 files changed, 124 insertions(+), 260 deletions(-) --- 2.49.0