From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 9C8371FF0BC for ; Thu, 15 Oct 2026 14:06:18 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 382ED213D3; Thu, 15 Oct 2026 14:06:15 +0200 (CEST) From: Filip Schauer To: pve-devel@lists.proxmox.com Subject: [PATCH container] lxc: remove unused find_lxc_console_pids helper Date: Thu, 15 Oct 2026 14:05:52 +0200 Message-ID: <20261015120607.84307-1-f.schauer@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1792065971536 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.394 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: 4CBQDE3TIJONPZBSK67LL2OOB7G5AU5N X-Message-ID-Hash: 4CBQDE3TIJONPZBSK67LL2OOB7G5AU5N X-MailFrom: f.schauer@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The helper is no longer needed, as its only user was the stale LXC console reaper in pve-manager, which was removed in 888c136dd303 ("fix #8093: pvestatd: remove stale lxc console reaper"). Drop the now dead code. Signed-off-by: Filip Schauer --- src/PVE/LXC.pm | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm index 65a04a4..9c6b3d3 100644 --- a/src/PVE/LXC.pm +++ b/src/PVE/LXC.pm @@ -414,36 +414,6 @@ sub vmstatus { return $list; } -sub find_lxc_console_pids { - - my $res = {}; - - PVE::Tools::dir_glob_foreach( - '/proc', - '\d+', - sub { - my ($pid) = @_; - - my $cmdline = PVE::Tools::file_read_firstline("/proc/$pid/cmdline"); - return if !$cmdline; - - my @args = split(/\0/, $cmdline); - - # search for lxc-console -n - return if scalar(@args) != 3; - return if $args[1] ne '-n'; - return if $args[2] !~ m/^\d+$/; - return if $args[0] !~ m|^(/usr/bin/)?lxc-console$|; - - my $vmid = $args[2]; - - push @{ $res->{$vmid} }, $pid; - }, - ); - - return $res; -} - sub find_lxc_pid { my ($vmid) = @_; -- 2.47.3