摘要:
用golang启动一个daemon 1 package main 2 3 import ( 4 "fmt" 5 "log" 6 "os" 7 "runtime" 8 "syscall" 9 "time"10 )11 12 func daemon(nochdir, noclose int) int {13 var ret, ret2 uintptr14 var err syscall.Errno15 16 darwin := runtime.GOOS == "darw 阅读全文