diff options
author | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2018-05-05 02:23:03 +0200 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2018-05-05 02:23:03 +0200 |
commit | edbce6b400250f764d3b9f38ecfc7bb29adbd967 (patch) | |
tree | 4b92b85cf66de6ddd7ec420c81c1c9f88805b183 /daemon_windows.go | |
parent | 6db41d5a269c79bd04b18dbfa171cc241a6cdcc9 (diff) | |
parent | e1de0f229a8f2cbfc4bb56230de885386a775fd6 (diff) |
Merge branch 'master' of ssh://git.zx2c4.com/wireguard-go
Diffstat (limited to 'daemon_windows.go')
-rw-r--r-- | daemon_windows.go | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/daemon_windows.go b/daemon_windows.go deleted file mode 100644 index 527718a..0000000 --- a/daemon_windows.go +++ /dev/null @@ -1,34 +0,0 @@ -package main - -import ( - "os" -) - -/* Daemonizes the process on windows - * - * This is done by spawning and releasing a copy with the --foreground flag - */ - -func Daemonize() error { - argv := []string{os.Args[0], "--foreground"} - argv = append(argv, os.Args[1:]...) - attr := &os.ProcAttr{ - Dir: ".", - Env: os.Environ(), - Files: []*os.File{ - os.Stdin, - nil, - nil, - }, - } - process, err := os.StartProcess( - argv[0], - argv, - attr, - ) - if err != nil { - return err - } - process.Release() - return nil -} |