Skip to content

Commit 6753e32

Browse files
committed
Fix #230: Signal parent once child takes over
1 parent 350ff31 commit 6753e32

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

main.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -188,12 +188,14 @@ func main() {
188188
wg.Wait()
189189
if waitedForSignal == syscall.SIGUSR1 {
190190
return
191-
} else {
192-
return fuse.EINVAL
193191
}
192+
return fuse.EINVAL
194193
} else {
194+
// Signal parent process since we are taking over
195+
_ = kill(os.Getppid(), syscall.SIGUSR1)
196+
195197
// kill our own waiting goroutine
196-
kill(os.Getpid(), syscall.SIGUSR1)
198+
_ = kill(os.Getpid(), syscall.SIGUSR1)
197199
wg.Wait()
198200
defer ctx.Release()
199201
}

0 commit comments

Comments
 (0)