Skip to content

Commit

Permalink
Fix #230: Signal parent once child takes over
Browse files Browse the repository at this point in the history
  • Loading branch information
mechanicker committed Jun 25, 2023
1 parent 350ff31 commit 6753e32
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,14 @@ func main() {
wg.Wait()
if waitedForSignal == syscall.SIGUSR1 {
return
} else {
return fuse.EINVAL
}
return fuse.EINVAL
} else {
// Signal parent process since we are taking over
_ = kill(os.Getppid(), syscall.SIGUSR1)

// kill our own waiting goroutine
kill(os.Getpid(), syscall.SIGUSR1)
_ = kill(os.Getpid(), syscall.SIGUSR1)
wg.Wait()
defer ctx.Release()
}
Expand Down

0 comments on commit 6753e32

Please sign in to comment.