aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-10-18 20:33:03 +0900
committerOphestra <cat@gensokyo.uk>2026-10-18 20:33:37 +0900
commit1a7b909f971dee8c215cf1877cd95a3d690730e1 (patch)
treeef27df23f8fcfb9ff770d69181a76efeb0d8c554 /cmd
parent9eb09ee7556cea7b9c138e4a3bfa1692f95347a5 (diff)
internal/system: file-based big lock
Simultaneous commits or reverts can race if they have overlapping targets. This big lock synchronises entry into the Commit and Revert critical sections across all cmd/hakurei processes. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/hakurei/testsuite/main.go2
-rw-r--r--cmd/hakurei/testsuite/sandbox/tester/main.go11
2 files changed, 1 insertions, 12 deletions
diff --git a/cmd/hakurei/testsuite/main.go b/cmd/hakurei/testsuite/main.go
index c9defc18..0e031430 100644
--- a/cmd/hakurei/testsuite/main.go
+++ b/cmd/hakurei/testsuite/main.go
@@ -860,7 +860,7 @@ func main() {
if dents, err := os.ReadDir(testsuite.HakureiPrefix); err != nil {
log.Fatal(err)
} else {
- if len(dents) != 3 {
+ if len(dents) != 4 {
log.Fatal("leftover hakurei work directories")
}
}
diff --git a/cmd/hakurei/testsuite/sandbox/tester/main.go b/cmd/hakurei/testsuite/sandbox/tester/main.go
index 452712d9..79d17c79 100644
--- a/cmd/hakurei/testsuite/sandbox/tester/main.go
+++ b/cmd/hakurei/testsuite/sandbox/tester/main.go
@@ -164,7 +164,6 @@ func main() {
}
if want.TrySocket != "" {
- retry:
abstractConn, abstractErr := net.Dial("unix", "@"+want.TrySocket)
pathnameConn, pathnameErr := net.Dial("unix", want.TrySocket)
ok := true
@@ -182,16 +181,6 @@ func main() {
}
}
- if errors.Is(
- abstractErr,
- syscall.EAGAIN,
- ) || errors.Is(
- pathnameErr,
- syscall.EAGAIN,
- ) {
- goto retry
- }
-
abstractWantErr := error(want.ErrnoAbstract)
pathnameWantErr := error(want.ErrnoPathname)
if want.ErrnoAbstract == 0 {