You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ar...@apache.org on 2017/07/13 11:35:58 UTC

mesos git commit: Replaced `abort()` with `_exit()` in `ChildHook::SUPERVISOR`.

Repository: mesos
Updated Branches:
  refs/heads/master 188109b63 -> 72ebb5e5b


Replaced `abort()` with `_exit()` in `ChildHook::SUPERVISOR`.

Previously, `abort()` was called in `SUPERVISOR` hook when child
process exited with an error code, or `waitpid()` failed, or parent
process exited. All these cases shouldn't lead to abnormal program
termination with coredumps.

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


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

Branch: refs/heads/master
Commit: 72ebb5e5b5fe6403db0f0b051821d3346ff6da22
Parents: 188109b
Author: Andrei Budnik <ab...@mesosphere.com>
Authored: Thu Jul 13 13:35:26 2017 +0200
Committer: Alexander Rojas <al...@mesosphere.io>
Committed: Thu Jul 13 13:35:26 2017 +0200

----------------------------------------------------------------------
 3rdparty/libprocess/src/subprocess.cpp | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/72ebb5e5/3rdparty/libprocess/src/subprocess.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/subprocess.cpp b/3rdparty/libprocess/src/subprocess.cpp
index b65484c..785e2e1 100644
--- a/3rdparty/libprocess/src/subprocess.cpp
+++ b/3rdparty/libprocess/src/subprocess.cpp
@@ -122,7 +122,7 @@ static void signalHandler(int signal)
   // Send SIGKILL to every process in the process group of the
   // calling process.
   kill(0, SIGKILL);
-  abort();
+  _exit(EXIT_FAILURE);
 }
 #endif // __linux__
 
@@ -178,7 +178,7 @@ Subprocess::ChildHook Subprocess::ChildHook::SUPERVISOR()
       int status = 0;
       while (waitpid(pid, &status, 0) == -1) {
         if (errno != EINTR) {
-          abort();
+          _exit(EXIT_FAILURE);
         }
       }
 
@@ -187,8 +187,7 @@ Subprocess::ChildHook Subprocess::ChildHook::SUPERVISOR()
         _exit(WEXITSTATUS(status));
       }
 
-      abort();
-      UNREACHABLE();
+      _exit(EXIT_FAILURE);
     }
 #endif // __linux__
     return Nothing();