From: Filip Schauer <f.schauer@proxmox.com>
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 [thread overview]
Message-ID: <20261015120607.84307-1-f.schauer@proxmox.com> (raw)
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 <f.schauer@proxmox.com>
---
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 <vmid>
- 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
next reply other threads:[~2026-10-15 12:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-15 12:05 Filip Schauer [this message]
2026-10-15 12:26 ` [PATCH container] lxc: remove unused find_lxc_console_pids helper Filip Schauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261015120607.84307-1-f.schauer@proxmox.com \
--to=f.schauer@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.