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 2014/03/28 00:08:54 UTC
[2/2] git commit: Cleaned up a continuation in launcher.cpp.
Cleaned up a continuation in launcher.cpp.
Review: https://reviews.apache.org/r/19701
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/1fe8e055
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/1fe8e055
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/1fe8e055
Branch: refs/heads/master
Commit: 1fe8e0553745d1e815658372dd9ae5fa7686957f
Parents: 38371f1
Author: Ian Downes <ia...@gmail.com>
Authored: Thu Mar 27 14:57:04 2014 -0700
Committer: Benjamin Mahler <bm...@twitter.com>
Committed: Thu Mar 27 16:06:40 2014 -0700
----------------------------------------------------------------------
src/slave/containerizer/launcher.cpp | 23 ++++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/1fe8e055/src/slave/containerizer/launcher.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/launcher.cpp b/src/slave/containerizer/launcher.cpp
index fb0c461..c83327b 100644
--- a/src/slave/containerizer/launcher.cpp
+++ b/src/slave/containerizer/launcher.cpp
@@ -40,6 +40,7 @@ namespace slave {
using state::RunState;
+
Try<Launcher*> PosixLauncher::create(const Flags& flags)
{
return new PosixLauncher();
@@ -122,15 +123,8 @@ Try<pid_t> PosixLauncher::fork(
}
-Future<Nothing> _destroy(const Future<Option<int> >& future)
-{
- if (future.isReady()) {
- return Nothing();
- } else {
- return Failure("Failed to kill all processes: " +
- (future.isFailed() ? future.failure() : "unknown error"));
- }
-}
+// Forward declaration.
+Future<Nothing> _destroy(const Future<Option<int> >& future);
Future<Nothing> PosixLauncher::destroy(const ContainerID& containerId)
@@ -154,6 +148,17 @@ Future<Nothing> PosixLauncher::destroy(const ContainerID& containerId)
}
+Future<Nothing> _destroy(const Future<Option<int> >& future)
+{
+ if (future.isReady()) {
+ return Nothing();
+ } else {
+ return Failure("Failed to kill all processes: " +
+ (future.isFailed() ? future.failure() : "unknown error"));
+ }
+}
+
+
} // namespace slave {
} // namespace internal {
} // namespace mesos {