ldd: remove timeout
All checks were successful
Test / Create distribution (push) Successful in 1m19s
Test / Sandbox (push) Successful in 3m16s
Test / Hakurei (push) Successful in 4m19s
Test / ShareFS (push) Successful in 4m30s
Test / Sandbox (race detector) (push) Successful in 5m49s
Test / Hakurei (race detector) (push) Successful in 6m53s
Test / Flake checks (push) Successful in 1m28s

The program generally never blocks, and it is more flexible to leave it up to the caller to set a timeout.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-04-07 14:49:20 +09:00
parent d7d42c69a1
commit 9c9e190db9

View File

@@ -7,7 +7,6 @@ import (
"io" "io"
"os" "os"
"os/exec" "os/exec"
"time"
"hakurei.app/check" "hakurei.app/check"
"hakurei.app/container" "hakurei.app/container"
@@ -27,9 +26,6 @@ const (
// lddName is the file name of ldd(1) passed to exec.LookPath. // lddName is the file name of ldd(1) passed to exec.LookPath.
lddName = "ldd" lddName = "ldd"
// lddTimeout is the maximum duration ldd(1) is allowed to ran for before it
// is terminated.
lddTimeout = 15 * time.Second
) )
// Resolve runs ldd(1) in a strict sandbox and connects its stdout to a [Decoder]. // Resolve runs ldd(1) in a strict sandbox and connects its stdout to a [Decoder].
@@ -52,7 +48,7 @@ func Resolve(
} }
} }
c, cancel := context.WithTimeout(ctx, lddTimeout) c, cancel := context.WithCancel(ctx)
defer cancel() defer cancel()
var toolPath *check.Absolute var toolPath *check.Absolute