mesos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From al...@apache.org
Subject [01/13] mesos git commit: Added comment regarding exit status on Windows vs. Posix in libprocess.
Date Wed, 15 Mar 2017 21:21:02 GMT
Repository: mesos
Updated Branches:
  refs/heads/master 3ce0aa161 -> 9393c2321


Added comment regarding exit status on Windows vs. Posix in libprocess.

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


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

Branch: refs/heads/master
Commit: 9393c2321eeabcdd31e3df851d2b901a86e39761
Parents: 4f00918
Author: Alexander Rukletsov <alexr@apache.org>
Authored: Tue Mar 14 14:29:27 2017 +0100
Committer: Alexander Rukletsov <alexr@apache.org>
Committed: Wed Mar 15 22:20:20 2017 +0100

----------------------------------------------------------------------
 .../include/process/subprocess_base.hpp           | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/9393c232/3rdparty/libprocess/include/process/subprocess_base.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/include/process/subprocess_base.hpp b/3rdparty/libprocess/include/process/subprocess_base.hpp
index 7117a27..a3edae6 100644
--- a/3rdparty/libprocess/include/process/subprocess_base.hpp
+++ b/3rdparty/libprocess/include/process/subprocess_base.hpp
@@ -278,14 +278,22 @@ public:
    * Exit status of this subprocess captured as a Future (completed
    * when the subprocess exits).
    *
-   * The exit status is propagated from an underlying call to
-   * 'waitpid' and can be used with macros defined in wait.h, i.e.,
-   * 'WIFEXITED(status)'.
+   * On Posix, the exit status is propagated from an underlying call
+   * to `waitpid` and can be used with macros defined in wait.h, i.e.,
+   * `WIFEXITED(status)`.
+   *
+   * On Windows, the exit status contains the exit code from an
+   * underlying call to `GetExitCodeProcess()`.
+   *
+   * TODO(alexr): Ensure the code working with `status` is portable by
+   * either making `WIFEXITED` family macros no-op on Windows or
+   * converting `status` to a tuple <termination status, exit code>,
+   * see MESOS-7242.
    *
    * NOTE: Discarding this future has no effect on the subprocess!
    *
-   * @return Future from doing a process::reap of this subprocess.
-   *     Note that process::reap never fails or discards this future.
+   * @return Future from doing a `process::reap()` of this subprocess.
+   *     Note that `process::reap()` never fails or discards this future.
    */
   Future<Option<int>> status() const { return data->status; }
 


Mime
View raw message