Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code 4.1中的问题以及一些其他建议 #89

Open
shejialuo opened this issue Oct 5, 2022 · 0 comments
Open

code 4.1中的问题以及一些其他建议 #89

shejialuo opened this issue Oct 5, 2022 · 0 comments

Comments

@shejialuo
Copy link

shejialuo commented Oct 5, 2022

mydocker/run.go

Lines 22 to 28 in 8ea47de

cgroupManager := cgroups.NewCgroupManager("donkey-cgroup")
defer cgroupManager.Destroy()
cgroupManager.Set(res)
cgroupManager.Apply(parent.Process.Pid)
sendInitCommand(comArray, writePipe)
parent.Wait()
os.Exit(0)

上述代码中的os.Exit(0)是不应该存在的,cgroupManager.Destroy()并不会执行。

其他的一些建议:

整个仓库的代码的Tag有点混乱,比如说code3.3的tag代码是不全的,是直接添加到code4.1中修复的。如果有时间的话,还是希望作者能够整理一下。再次感谢作者的贡献,这本书写的很好,弥补了我实战的缺少。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant