diff options
Diffstat (limited to '')
-rw-r--r-- | daemon.go (renamed from daemon_linux.go) | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/daemon_linux.go b/daemon.go index e1aaede..e2ded87 100644 --- a/daemon_linux.go +++ b/daemon.go @@ -2,17 +2,10 @@ package main import ( "os" - "os/exec" ) -/* Daemonizes the process on linux - * - * This is done by spawning and releasing a copy with the --foreground flag - */ func Daemonize(attr *os.ProcAttr) error { - // I would like to use os.Executable, - // however this means dropping support for Go <1.8 - path, err := exec.LookPath(os.Args[0]) + path, err := os.Executable() if err != nil { return err } |