0 Star 0 Fork 616

李明 / gf

forked from John / gf 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
test2.go 494 Bytes
一键复制 编辑 原始数据 按行查看 历史
package main
import (
"fmt"
"gitee.com/johng/gf/g/os/gpm"
"os"
"time"
"gitee.com/johng/gf/g/os/glog"
)
func main() {
m := gproc.New()
env := os.Environ()
env = append(env, "child=1")
p := m.NewProcess(os.Args[0], os.Args, env)
if os.Getenv("child") != "" {
time.Sleep(3*time.Second)
glog.Error("error")
} else {
pid, err := p.Run()
fmt.Println(pid)
fmt.Println(err)
fmt.Println(p.Wait())
}
}
Go
1
https://gitee.com/limingsky/gf.git
git@gitee.com:limingsky/gf.git
limingsky
gf
gf
c9a36a8224f1

搜索帮助