diff options
Diffstat (limited to 'src/godo.go')
-rw-r--r-- | src/godo.go | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/godo.go b/src/godo.go index 72f68c0..cc29a01 100644 --- a/src/godo.go +++ b/src/godo.go | |||
@@ -51,26 +51,8 @@ func main() { | |||
51 | } | 51 | } |
52 | 52 | ||
53 | // 创世之神,1号进程 | 53 | // 创世之神,1号进程 |
54 | // pids[1] = &process{rootfs: "/", children: make([]int, 0)} | ||
55 | // pids[1].children = append(pids[1].children, containerdPid) | ||
56 | // 1号进程还是不要在进程树上直接出现了,不然它的小儿子们都会出现 | 54 | // 1号进程还是不要在进程树上直接出现了,不然它的小儿子们都会出现 |
57 | |||
58 | // /usr/bin/containerd,也就是我们最关注的进程 | 55 | // /usr/bin/containerd,也就是我们最关注的进程 |
59 | // pids[containerdPid] = &process{rootfs: "/", children: make([]int, 0)} | ||
60 | pids.Store(containerdPid, &process{ | ||
61 | ppid: 1, | ||
62 | pid: containerdPid, | ||
63 | argv: make([]string, 0), | ||
64 | cwd: "/", | ||
65 | rootfs: "/", | ||
66 | children: make([]int, 0), | ||
67 | }) | ||
68 | p, ok := pids.Load(containerdPid) | ||
69 | if !ok { | ||
70 | fmt.Printf("???\n") | ||
71 | return | ||
72 | } | ||
73 | p.(*process).argv = append(p.(*process).argv, "/usr/bin/containerd") | ||
74 | 56 | ||
75 | // 开始运行,解析命令行参数后监听 | 57 | // 开始运行,解析命令行参数后监听 |
76 | if err := fs.Parse(os.Args[1:]); err != nil { | 58 | if err := fs.Parse(os.Args[1:]); err != nil { |