aboutsummaryrefslogtreecommitdiff
path: root/src/daemon_linux.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon_linux.go')
-rw-r--r--src/daemon_linux.go11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/daemon_linux.go b/src/daemon_linux.go
index 730f89e..8210f8b 100644
--- a/src/daemon_linux.go
+++ b/src/daemon_linux.go
@@ -11,18 +11,9 @@ import (
* TODO: Use env variable to spawn in background
*/
-func Daemonize() error {
+func Daemonize(attr *os.ProcAttr) 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,