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

Merge pull request #13132 from LK4D4/fix_race_kill

Fix race between execdriver.Kill and execdriver.Run
This commit is contained in:
Jessie Frazelle 2015-05-11 14:01:07 -07:00
commit a47fb5edca

View file

@ -245,7 +245,9 @@ func waitInPIDHost(p *libcontainer.Process, c libcontainer.Container) func() (*o
}
func (d *driver) Kill(c *execdriver.Command, sig int) error {
d.Lock()
active := d.activeContainers[c.ID]
d.Unlock()
if active == nil {
return fmt.Errorf("active container for %s does not exist", c.ID)
}