From f656968350be67b3458db01a8d75a8216f3238a8 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 30 Aug 2026 18:46:43 +0900 Subject: internal/store: destroy stale instances This recovers from inconsistent state on power loss and /tmp/ is not wiped on startup, or if hakurei somehow crashes. Signed-off-by: Ophestra --- cmd/app/lock.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cmd/app') diff --git a/cmd/app/lock.go b/cmd/app/lock.go index 5a22efba..88068381 100644 --- a/cmd/app/lock.go +++ b/cmd/app/lock.go @@ -6,6 +6,7 @@ import ( "os" "strconv" "strings" + "syscall" "hakurei.app/check" "hakurei.app/fhs" @@ -57,7 +58,7 @@ func informTemplate(base *check.Absolute, name string, mutable bool) (func() err var s hst.State for eh := range entries { s = hst.State{} - if _, err := eh.Load(&s); err != nil { + if _, err := eh.Load(&s, syscall.Kill); err != nil { return nil, err } -- cgit v1.3.1