aboutsummaryrefslogtreecommitdiffhomepage
path: root/ldd
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-04-07 14:49:20 +0900
committerOphestra <cat@gensokyo.uk>2026-04-07 14:49:20 +0900
commit9c9e190db942c2314a32497118523dc2a296f571 (patch)
tree67ca3f9590b2383fb1d1c706dc3af1e4434ead60 /ldd
parentd7d42c69a1de656692a6da14c40d2f34cfc46ded (diff)
ldd: remove timeout
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>
Diffstat (limited to 'ldd')
-rw-r--r--ldd/exec.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/ldd/exec.go b/ldd/exec.go
index 567f33ca..91619023 100644
--- a/ldd/exec.go
+++ b/ldd/exec.go
@@ -7,7 +7,6 @@ import (
"io"
"os"
"os/exec"
- "time"
"hakurei.app/check"
"hakurei.app/container"
@@ -27,9 +26,6 @@ const (
// lddName is the file name of ldd(1) passed to exec.LookPath.
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].
@@ -52,7 +48,7 @@ func Resolve(
}
}
- c, cancel := context.WithTimeout(ctx, lddTimeout)
+ c, cancel := context.WithCancel(ctx)
defer cancel()
var toolPath *check.Absolute