aboutsummaryrefslogtreecommitdiff
path: root/daemonize.go
diff options
context:
space:
mode:
Diffstat (limited to 'daemonize.go')
-rw-r--r--daemonize.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/daemonize.go b/daemonize.go
index 32255ca..4f09164 100644
--- a/daemonize.go
+++ b/daemonize.go
@@ -21,7 +21,8 @@ func waitForUsr1() {
func daemonize() {
go waitForUsr1()
name := os.Args[0]
- newArgs := []string{"-f"}
+ notifyArg := fmt.Sprintf("-notifypid=%d", os.Getpid())
+ newArgs := []string{"-f", notifyArg}
newArgs = append(newArgs, os.Args[1:]...)
c := exec.Command(name, newArgs...)
c.Stdout = os.Stdout