prevent remount during exit to avoid killing 9pfuse

This commit is contained in:
Levi Neely 2026-06-15 16:13:35 +02:00
parent aecd2b658d
commit 2da9867f99
1 changed files with 6 additions and 0 deletions

View File

@ -9,12 +9,14 @@ import (
"sort"
"strings"
"sync"
"sync/atomic"
"time"
"9fans.net/go/acme"
)
var ollie string
var exiting atomic.Bool
func init() {
ollie = os.Getenv("OLLIE")
@ -24,6 +26,9 @@ func init() {
}
func remount() {
if exiting.Load() {
return
}
exec.Command("ollie-remount").Run() //nolint:errcheck
}
@ -164,6 +169,7 @@ func (sl *sessionList) eventLoop() {
sl.win.WriteEvent(e)
}
}
exiting.Store(true)
os.Exit(0)
}