prevent remount during exit to avoid killing 9pfuse
This commit is contained in:
parent
aecd2b658d
commit
2da9867f99
6
main.go
6
main.go
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in New Issue