Repository: mesos Updated Branches: refs/heads/master 27cb2b1fa -> 28ab19b11
Prevented Docker library from terminating incorrect processes. Previously, the Docker library might call `os::killtree()` on a PID after the associated subprocess had already terminated, which could lead to an unknown process being incorrectly killed. Review: https://reviews.apache.org/r/65786/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/9a414ab2 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/9a414ab2 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/9a414ab2 Branch: refs/heads/master Commit: 9a414ab2f9dcaa599afa2ef3d5dd38e66e0258c7 Parents: 27cb2b1 Author: Greg Mann <g...@mesosphere.io> Authored: Fri Feb 23 16:41:44 2018 -0800 Committer: Greg Mann <gregorywm...@gmail.com> Committed: Fri Feb 23 17:44:44 2018 -0800 ---------------------------------------------------------------------- src/docker/docker.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/9a414ab2/src/docker/docker.cpp ---------------------------------------------------------------------- diff --git a/src/docker/docker.cpp b/src/docker/docker.cpp index 62349ab..4c4c198 100644 --- a/src/docker/docker.cpp +++ b/src/docker/docker.cpp @@ -148,8 +148,10 @@ Try<Owned<Docker>> Docker::create( void commandDiscarded(const Subprocess& s, const string& cmd) { - VLOG(1) << "'" << cmd << "' is being discarded"; - os::killtree(s.pid(), SIGKILL); + if (s.status().isPending()) { + VLOG(1) << "'" << cmd << "' is being discarded"; + os::killtree(s.pid(), SIGKILL); + } }