From fcd9becf9a611867ad75b3425776433ad4b19951 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 22 Oct 2025 05:09:08 +0900 Subject: [PATCH] cmd/hsu: run in locked thread Goroutine scheduling is not helpful in the setuid wrapper, it is not particularly harmful but lock here anyway. Signed-off-by: Ophestra --- cmd/hsu/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/hsu/main.go b/cmd/hsu/main.go index 5901087..7e3b3a7 100644 --- a/cmd/hsu/main.go +++ b/cmd/hsu/main.go @@ -8,6 +8,7 @@ import ( "log" "os" "path" + "runtime" "slices" "strconv" "strings" @@ -32,6 +33,8 @@ const ( var hakureiPath string func main() { + runtime.LockOSThread() + log.SetFlags(0) log.SetPrefix("hsu: ") log.SetOutput(os.Stderr)