diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-02-28 20:42:33 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-02-28 20:44:44 +0900 |
| commit | c74c269b66770f0eddde255d2805b79f274409e9 (patch) | |
| tree | 02cb3e1bed01d24776d8d47a9c8fca47ed3d7343 /container/executable.go | |
| parent | 4b0cce4db5f8e75c79e104f8c5ec02cb4541ed76 (diff) | |
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 <cat@gensokyo.uk>
Diffstat (limited to 'container/executable.go')
| -rw-r--r-- | container/executable.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/container/executable.go b/container/executable.go index 67c43a70..b825306a 100644 --- a/container/executable.go +++ b/container/executable.go @@ -28,6 +28,9 @@ func copyExecutable(msg message.Msg) { } } +// MustExecutable calls [os.Executable] and terminates the process on error. +// +// Deprecated: This is no longer used and will be removed in 0.4. func MustExecutable(msg message.Msg) string { executableOnce.Do(func() { copyExecutable(msg) }) return executable |
