diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-03 04:49:35 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-03 14:55:10 +0200 |
commit | 258a9223b9ab18a973c44b238e029a0dc5640102 (patch) | |
tree | 5207280a53e690ed09777adabee95d586ac85393 /daemon_windows.go | |
parent | 168ef61a638e4875b260edbc51551bae0dc34ac3 (diff) |
Start to dust off Darwin
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 -} |