From 9c9e190db942c2314a32497118523dc2a296f571 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Tue, 7 Apr 2026 14:49:20 +0900 Subject: [PATCH] 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 --- ldd/exec.go | 6 +----- 1 file changed, 1 insertion(+), 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