1 Star 0 Fork 0

wuzpdev/goworld

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
unix.go 433 Bytes
Copy Edit Raw Blame History
seis authored 2017-11-03 17:33 . no daemon for windows
// +build !windows
package binutil
import (
"os"
"github.com/sevlyar/go-daemon"
"github.com/xiaonanln/goworld/engine/gwlog"
)
func Daemonize() *daemon.Context {
context := new(daemon.Context)
child, err := context.Reborn()
if err != nil {
// daemonize failed
gwlog.Panicf("daemonize failed: %v", err)
}
if child != nil {
gwlog.Infof("run in daemon mode")
os.Exit(0)
return nil
} else {
return context
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wuzpdev/goworld.git
git@gitee.com:wuzpdev/goworld.git
wuzpdev
goworld
goworld
v0.1.4

Search

0d507c66 1850385 C8b1a773 1850385