From c74c269b66770f0eddde255d2805b79f274409e9 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sat, 28 Feb 2026 20:42:33 +0900 Subject: container: use /proc/self/exe directly This is a more reliable form of pathname to self and also cheaper than os.Executable. Signed-off-by: Ophestra --- container/fhs/fhs.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'container/fhs/fhs.go') diff --git a/container/fhs/fhs.go b/container/fhs/fhs.go index e0c1d861..6d098d0c 100644 --- a/container/fhs/fhs.go +++ b/container/fhs/fhs.go @@ -41,6 +41,10 @@ const ( // ProcSys points to a hierarchy below /proc/ that exposes a number of // kernel tunables. ProcSys = Proc + "sys/" + // ProcSelf resolves to the process's own /proc/pid directory. + ProcSelf = Proc + "self/" + // ProcSelfExe is a symbolic link to program pathname. + ProcSelfExe = ProcSelf + "exe" // Sys points to a virtual kernel file system exposing discovered devices // and other functionality. Sys = "/sys/" -- cgit v1.3.1