gistfile1.go p$� V �V� V /* ivan(a.t)mysqlab.net */ package main import ( "syscall" "os" "log" ) func daemon(nochdir, noclose int) int { var ret, ret2 uintptr var err uintptr darwin := syscall.OS == "darwin" // already a daemon if syscall.Getppid() == 1 { return 0 } // fork off the parent process ret, ret2, err = syscall.RawSyscall(syscall.SYS_FORK, 0, 0, 0) if err != 0 { return -1 } // failure i