Move container.json and pid file into a root specific driver dir

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
Michael Crosby 2014-02-25 12:41:31 -08:00
parent faa2334eea
commit 2acaf7ca82
3 changed files with 11 additions and 9 deletions

View file

@ -18,11 +18,11 @@ type DefaultStateWriter struct {
Root string
}
// writePidFile writes the namespaced processes pid to .nspid in the rootfs for the container
// writePidFile writes the namespaced processes pid to pid in the rootfs for the container
func (d *DefaultStateWriter) WritePid(pid int) error {
return ioutil.WriteFile(filepath.Join(d.Root, ".nspid"), []byte(fmt.Sprint(pid)), 0655)
return ioutil.WriteFile(filepath.Join(d.Root, "pid"), []byte(fmt.Sprint(pid)), 0655)
}
func (d *DefaultStateWriter) DeletePid() error {
return os.Remove(filepath.Join(d.Root, ".nspid"))
return os.Remove(filepath.Join(d.Root, "pid"))
}