aboutsummaryrefslogtreecommitdiffstats
path: root/daemon_linux.go
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2018-05-05 02:23:03 +0200
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2018-05-05 02:23:03 +0200
commitedbce6b400250f764d3b9f38ecfc7bb29adbd967 (patch)
tree4b92b85cf66de6ddd7ec420c81c1c9f88805b183 /daemon_linux.go
parentInitial version of migration to new event model (diff)
parentuapi: use kqueue for sock deletion on darwin (diff)
downloadwireguard-go-edbce6b400250f764d3b9f38ecfc7bb29adbd967.tar.xz
wireguard-go-edbce6b400250f764d3b9f38ecfc7bb29adbd967.zip
Merge branch 'master' of ssh://git.zx2c4.com/wireguard-go
Diffstat (limited to 'daemon_linux.go')
-rw-r--r--daemon_linux.go32
1 files changed, 0 insertions, 32 deletions
diff --git a/daemon_linux.go b/daemon_linux.go
deleted file mode 100644
index e1aaede..0000000
--- a/daemon_linux.go
+++ /dev/null
@@ -1,32 +0,0 @@
-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])
- if err != nil {
- return err
- }
-
- argv := []string{os.Args[0], "--foreground"}
- argv = append(argv, os.Args[1:]...)
- process, err := os.StartProcess(
- path,
- argv,
- attr,
- )
- if err != nil {
- return err
- }
- process.Release()
- return nil
-}