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

mesos git commit: Handled EINTR for waitpid in ChildHook::SUPERVISOR from subprocess.

Repository: mesos
Updated Branches:
  refs/heads/master 77005e581 -> 4e41d847e


Handled EINTR for waitpid in ChildHook::SUPERVISOR from subprocess.

If `waitpid` fails due to `EINTR`, we need to retry.

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


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

Branch: refs/heads/master
Commit: 4e41d847eb3df75bf28a4e169eeaedf419222229
Parents: 77005e5
Author: Andrei Budnik <ab...@mesosphere.com>
Authored: Tue Jul 11 10:37:54 2017 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Tue Jul 11 10:41:40 2017 -0700

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


http://git-wip-us.apache.org/repos/asf/mesos/blob/4e41d847/3rdparty/libprocess/src/subprocess.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/subprocess.cpp b/3rdparty/libprocess/src/subprocess.cpp
index d0aa5f8..8f8a715 100644
--- a/3rdparty/libprocess/src/subprocess.cpp
+++ b/3rdparty/libprocess/src/subprocess.cpp
@@ -169,8 +169,10 @@ Subprocess::ChildHook Subprocess::ChildHook::SUPERVISOR()
 
       // Block until the child process finishes.
       int status = 0;
-      if (waitpid(pid, &status, 0) == -1) {
-        abort();
+      while (waitpid(pid, &status, 0) == -1) {
+        if (errno != EINTR) {
+          abort();
+        }
       }
 
       // Forward the exit status if the child process exits normally.