Only attempt to find pid with local daemon

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 014cecda464fb1171e613676e0a8a85c02ec1674
Component: engine
This commit is contained in:
Daniel Nephin
2017-09-13 17:00:55 -04:00
parent c95e22b252
commit 1546d32eb0

View File

@ -79,6 +79,9 @@ type DockerSuite struct {
}
func (s *DockerSuite) OnTimeout(c *check.C) {
if !testEnv.IsLocalDaemon() {
return
}
path := filepath.Join(os.Getenv("DEST"), "docker.pid")
b, err := ioutil.ReadFile(path)
if err != nil {
@ -91,7 +94,7 @@ func (s *DockerSuite) OnTimeout(c *check.C) {
}
daemonPid := int(rawPid)
if daemonPid > 0 && testEnv.IsLocalDaemon() {
if daemonPid > 0 {
daemon.SignalDaemonDump(daemonPid)
}
}