Make sure signalAllProcesses is invoked in the function of destroy
It's expect that signalAllProcesses is invoked when container shares
pid namespace. share pid ns contains the following conditions:
{
// no specify pid ns
}
{
"type": "pid",
"path": "/proc/${num}/ns/pid"
}
@@ -38,7 +38,8 @@ type containerState interface {
}
func destroy(c *linuxContainer) error {
- if !c.config.Namespaces.Contains(configs.NEWPID) {
+ if !c.config.Namespaces.Contains(configs.NEWPID) ||
+ c.config.Namespaces.PathOf(configs.NEWPID) != "" {
if err := signalAllProcesses(c.cgroupManager, unix.SIGKILL); err != nil {
logrus.Warn(err)
}
