aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-10-22 05:09:08 +0900
committerOphestra <cat@gensokyo.uk>2025-10-22 05:09:08 +0900
commitfcd9becf9a611867ad75b3425776433ad4b19951 (patch)
tree5aba09525aff70d0bce56b7d720cec9727e98e74
parent622f945c22d785b0ab5fd85fa2f32e0c68c647f1 (diff)
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 <cat@gensokyo.uk>
-rw-r--r--cmd/hsu/main.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd/hsu/main.go b/cmd/hsu/main.go
index 5901087c..7e3b3a7b 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)