diff --git a/internal/cmdrunner/process_posix.go b/internal/cmdrunner/process_posix.go index c9e89411..a8a2cab1 100644 --- a/internal/cmdrunner/process_posix.go +++ b/internal/cmdrunner/process_posix.go @@ -15,6 +15,11 @@ import ( func _pidAlive(pid int) bool { proc, err := os.FindProcess(pid) if err == nil { + // On Linux with Go 1.23+, FindProcess opens a pidfd which must be + // released or it leaks an FD on every call. Release errors are + // intentionally ignored; the handle is short-lived and there's + // nothing actionable to recover from a release failure. + defer func() { _ = proc.Release() }() err = proc.Signal(syscall.Signal(0)) }