使用示例:
```go
func main() {
Pre()
context := new(Context)
child, _ := context.Reborn()
if child != nil {
PostParent()
} else {
defer context.Release()
PostChild()
}
}
```
![idea](https://raw.githubusercontent.com/sevlyar/go-daemon/master/img/idea.png)
项目地址:https://github.com/sevlyar/go-daemon
有疑问加站长微信联系(非本文作者)