mesos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From al...@apache.org
Subject [1/3] mesos git commit: Improved the comment around the union in ns::clone().
Date Fri, 22 Dec 2017 18:46:59 GMT
Repository: mesos
Updated Branches:
  refs/heads/master 0685b3ce3 -> 223aad37e


Improved the comment around the union in ns::clone().

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


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

Branch: refs/heads/master
Commit: b44e36289320ac2cf9e8fa80bd7905bc44cd4a87
Parents: 0685b3c
Author: Alexander Rukletsov <rukletsov@gmail.com>
Authored: Fri Dec 22 19:41:47 2017 +0100
Committer: Alexander Rukletsov <alexr@apache.org>
Committed: Fri Dec 22 19:46:24 2017 +0100

----------------------------------------------------------------------
 src/linux/ns.cpp | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/b44e3628/src/linux/ns.cpp
----------------------------------------------------------------------
diff --git a/src/linux/ns.cpp b/src/linux/ns.cpp
index 5e2df1e..8b59ba7 100644
--- a/src/linux/ns.cpp
+++ b/src/linux/ns.cpp
@@ -317,10 +317,9 @@ Try<pid_t> clone(
   iov.iov_base = base;
   iov.iov_len = sizeof(base);
 
-  // Need to allocate a char array large enough to hold "control"
-  // data. However, since this buffer is in reality a 'struct cmsghdr'
-  // we use a union to ensure that it is aligned as required for that
-  // structure.
+  // We need to allocate a char array large enough to hold "control" data. However,
+  // since this buffer is in reality a 'struct cmsghdr' with the payload, we use
+  // a union to ensure that it is aligned as required for that structure.
   union {
     struct cmsghdr cmessage;
     char control[CMSG_SPACE(sizeof(struct ucred))];


Mime
View raw message