mesos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From josep...@apache.org
Subject [1/5] mesos git commit: Windows: Added `Winsock` initialization in `docker-mesos-executor`.
Date Tue, 20 Dec 2016 22:28:55 GMT
Repository: mesos
Updated Branches:
  refs/heads/master b743fb474 -> 3755d37f0


Windows: Added `Winsock` initialization in `docker-mesos-executor`.

This adds a RAII object for initializing and destructing the Windows
Socket stack inside the default docker executor binary.  This object
is needed for any socket operations to succeed on Windows.

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


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

Branch: refs/heads/master
Commit: cf4939f4552213bcde089d96a1170238f4a06727
Parents: 4a411b8
Author: Daniel Pravat <dpravat@outlook.com>
Authored: Mon Dec 19 16:23:01 2016 -0800
Committer: Joseph Wu <josephwu@apache.org>
Committed: Tue Dec 20 12:48:34 2016 -0800

----------------------------------------------------------------------
 src/docker/executor.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/cf4939f4/src/docker/executor.cpp
----------------------------------------------------------------------
diff --git a/src/docker/executor.cpp b/src/docker/executor.cpp
index 94e116f..9b5c469 100644
--- a/src/docker/executor.cpp
+++ b/src/docker/executor.cpp
@@ -29,6 +29,10 @@
 #include <process/reap.hpp>
 #include <process/subprocess.hpp>
 
+#ifdef __WINDOWS__
+#include <process/windows/winsock.hpp>
+#endif // __WINDOWS__
+
 #include <stout/error.hpp>
 #include <stout/flags.hpp>
 #include <stout/json.hpp>
@@ -671,6 +675,11 @@ int main(int argc, char** argv)
 {
   GOOGLE_PROTOBUF_VERIFY_VERSION;
 
+#ifdef __WINDOWS__
+  // Initialize the Windows socket stack.
+  process::Winsock winsock;
+#endif // __WINDOWS__
+
   mesos::internal::docker::Flags flags;
 
   // Load flags from environment and command line.


Mime
View raw message