mesos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ji...@apache.org
Subject mesos git commit: Properly handle stopped child in the 'init' process.
Date Wed, 28 Sep 2016 00:46:02 GMT
Repository: mesos
Updated Branches:
  refs/heads/master 31350f9d3 -> e60aece7a


Properly handle stopped child in the 'init' process.

We should not terminate if the child has stopped due to some signal
(e.g., SIGSTOP). We only forward the signal if the child has
terminated.

Review: https://reviews.apache.org/r/52325


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/e60aece7
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/e60aece7
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/e60aece7

Branch: refs/heads/master
Commit: e60aece7acdcf5514d3a9e8f83de69a08aa0251e
Parents: 31350f9
Author: Jie Yu <yujie.jay@gmail.com>
Authored: Tue Sep 27 17:39:58 2016 -0700
Committer: Jie Yu <yujie.jay@gmail.com>
Committed: Tue Sep 27 17:45:58 2016 -0700

----------------------------------------------------------------------
 src/slave/containerizer/mesos/launch.cpp | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/e60aece7/src/slave/containerizer/mesos/launch.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/launch.cpp b/src/slave/containerizer/mesos/launch.cpp
index 11eaa0e..7cc0c3f 100644
--- a/src/slave/containerizer/mesos/launch.cpp
+++ b/src/slave/containerizer/mesos/launch.cpp
@@ -664,6 +664,13 @@ int MesosContainerizerLaunch::execute()
           exitWithStatus(EXIT_FAILURE);
         }
 
+        // We only forward the signal if the child has terminated. If
+        // the child has stopped due to some signal (e.g., SIGSTOP),
+        // we will simply ignore it.
+        if (WIFSTOPPED(status)) {
+          continue;
+        }
+
         if (pid == waitpid.get()) {
           break;
         }


Mime
View raw message