1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Fix kill signals and rootfs path for pid

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
Michael Crosby 2014-02-24 14:35:27 -08:00
parent cfd188e925
commit a6e5e18511

View file

@ -64,7 +64,7 @@ type info struct {
}
func (i *info) IsRunning() bool {
p := filepath.Join(i.driver.root, "containers", i.ID, "rootfs", ".nspid")
p := filepath.Join(i.driver.root, "containers", i.ID, "root", ".nspid")
if _, err := os.Stat(p); err == nil {
return true
}
@ -106,7 +106,7 @@ func (d *driver) Run(c *execdriver.Command, pipes *execdriver.Pipes, startCallba
}
func (d *driver) Kill(p *execdriver.Command, sig int) error {
return p.Process.Kill()
return syscall.Kill(p.Process.Pid, syscall.Signal(sig))
}
func (d *driver) Restore(c *execdriver.Command) error {