internal/app/state: use internal/lockedfile

This is a pretty solid implementation backed by robust tests, with a much cleaner interface.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-10-25 21:28:49 +09:00
parent 8d3381821f
commit 470e545d27
18 changed files with 1512 additions and 129 deletions

View File

@@ -192,12 +192,6 @@ func (ms mainState) beforeExit(isFault bool) {
} else if ms.uintptr&mainNeedsDestroy != 0 {
panic("unreachable")
}
if ms.store != nil {
if err := ms.store.Close(); err != nil {
perror(err, "close state store")
}
}
}
// fatal calls printMessageError, performs necessary cleanup, followed by a call to [os.Exit](1).