diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-08-30 18:46:43 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-08-30 18:46:43 +0900 |
| commit | f656968350be67b3458db01a8d75a8216f3238a8 (patch) | |
| tree | 74ec7b67f66c642804323f4e59c2f796e3758f85 /cmd/app | |
| parent | d4fab811d3857c36f1d8271a940ffca113e012b7 (diff) | |
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 <cat@gensokyo.uk>
Diffstat (limited to 'cmd/app')
| -rw-r--r-- | cmd/app/lock.go | 3 |
1 files changed, 2 insertions, 1 deletions
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 } |
