cmd/torrentfs/main.go | 9 +++++++-- diff --git a/cmd/torrentfs/main.go b/cmd/torrentfs/main.go index 694c8938bb03937892ddc34e28cb137b530a04b7..b55a7a0892f381b9e85c4d2b2a4160706bf642f7 100644 --- a/cmd/torrentfs/main.go +++ b/cmd/torrentfs/main.go @@ -57,8 +57,13 @@ func setSignalHandlers() { c := make(chan os.Signal) signal.Notify(c, syscall.SIGINT, syscall.SIGTERM) go func() { - <-c - fuse.Unmount(mountDir) + for { + <-c + err := fuse.Unmount(mountDir) + if err != nil { + log.Print(err) + } + } }() }