|
@@ -15,7 +15,7 @@ import (
|
|
"github.com/Microsoft/hcsshim"
|
|
"github.com/Microsoft/hcsshim"
|
|
"github.com/Sirupsen/logrus"
|
|
"github.com/Sirupsen/logrus"
|
|
"github.com/docker/docker/pkg/sysinfo"
|
|
"github.com/docker/docker/pkg/sysinfo"
|
|
- "github.com/opencontainers/runtime-spec/specs-go"
|
|
|
|
|
|
+ specs "github.com/opencontainers/runtime-spec/specs-go"
|
|
)
|
|
)
|
|
|
|
|
|
type client struct {
|
|
type client struct {
|
|
@@ -396,10 +396,12 @@ func (clnt *client) Signal(containerID string, sig int) error {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- // Terminate Process
|
|
|
|
- if err := cont.hcsProcess.Kill(); err != nil && !hcsshim.IsAlreadyStopped(err) {
|
|
|
|
- // ignore errors
|
|
|
|
- logrus.Warnf("libcontainerd: failed to terminate pid %d in %s: %q", cont.systemPid, containerID, err)
|
|
|
|
|
|
+ // Shut down the container
|
|
|
|
+ if err := cont.hcsContainer.Shutdown(); err != nil {
|
|
|
|
+ if !hcsshim.IsPending(err) && !hcsshim.IsAlreadyStopped(err) {
|
|
|
|
+ // ignore errors
|
|
|
|
+ logrus.Warnf("libcontainerd: failed to shutdown container %s: %q", containerID, err)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|