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 2015/09/25 00:05:33 UTC
[2/2] mesos git commit: Do not retry close on EINTR.
Do not retry close on EINTR.
See: https://issues.apache.org/jira/browse/MESOS-3512
Review: https://reviews.apache.org/r/38730
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/2c17e564
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/2c17e564
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/2c17e564
Branch: refs/heads/master
Commit: 2c17e5642c1fa7373eca712e9e7fd2edcbaa8955
Parents: c76a35c
Author: Benjamin Mahler <be...@gmail.com>
Authored: Thu Sep 24 12:37:58 2015 -0700
Committer: Benjamin Mahler <be...@gmail.com>
Committed: Thu Sep 24 14:47:40 2015 -0700
----------------------------------------------------------------------
src/slave/containerizer/linux_launcher.cpp | 4 ++--
src/tests/containerizer/isolator_tests.cpp | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/2c17e564/src/slave/containerizer/linux_launcher.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/linux_launcher.cpp b/src/slave/containerizer/linux_launcher.cpp
index 6e266bd..c03b89e 100644
--- a/src/slave/containerizer/linux_launcher.cpp
+++ b/src/slave/containerizer/linux_launcher.cpp
@@ -275,7 +275,7 @@ static int childSetup(
const Option<lambda::function<int()>>& setup)
{
// In child.
- while (::close(pipes[1]) == -1 && errno == EINTR);
+ ::close(pipes[1]);
// Do a blocking read on the pipe until the parent signals us to
// continue.
@@ -288,7 +288,7 @@ static int childSetup(
ABORT("Failed to synchronize with parent");
}
- while (::close(pipes[0]) == -1 && errno == EINTR);
+ ::close(pipes[0]);
// Move to a different session (and new process group) so we're
// independent from the slave's session (otherwise children will
http://git-wip-us.apache.org/repos/asf/mesos/blob/2c17e564/src/tests/containerizer/isolator_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/isolator_tests.cpp b/src/tests/containerizer/isolator_tests.cpp
index a25ae97..237f3f2 100644
--- a/src/tests/containerizer/isolator_tests.cpp
+++ b/src/tests/containerizer/isolator_tests.cpp
@@ -113,7 +113,7 @@ namespace tests {
static int childSetup(int pipes[2])
{
// In child process.
- while (::close(pipes[1]) == -1 && errno == EINTR);
+ ::close(pipes[1]);
// Wait until the parent signals us to continue.
char dummy;
@@ -125,7 +125,7 @@ static int childSetup(int pipes[2])
ABORT("Failed to synchronize with parent");
}
- while (::close(pipes[0]) == -1 && errno == EINTR);
+ ::close(pipes[0]);
return 0;
}