diff --git a/main.go b/main.go index 112b8595..16750f56 100644 --- a/main.go +++ b/main.go @@ -196,6 +196,9 @@ func main() { kill(os.Getpid(), syscall.SIGUSR1) wg.Wait() defer ctx.Release() + + // Signal parent process since we are taking over + _ = kill(os.Getppid(), syscall.SIGUSR1) } } else { @@ -211,15 +214,9 @@ func main() { flags) if err != nil { - if !flags.Foreground { - kill(os.Getppid(), syscall.SIGUSR2) - } log.Fatalf("Mounting file system: %v", err) // fatal also terminates itself } else { - if !flags.Foreground { - kill(os.Getppid(), syscall.SIGUSR1) - } log.Println("File system has been successfully mounted.") // Let the user unmount with Ctrl-C // (SIGINT). But if cache is on, catfs will