You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jo...@apache.org on 2017/07/11 01:39:15 UTC
[29/50] mesos git commit: Windows: Implemented `WSTRINGIFY()` to
print exit codes.
Windows: Implemented `WSTRINGIFY()` to print exit codes.
Review: https://reviews.apache.org/r/60324/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/d7eee2df
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/d7eee2df
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/d7eee2df
Branch: refs/heads/master
Commit: d7eee2dff8cb83aa231fe4b564f075ab12fbcc71
Parents: 6d782b1
Author: Andrew Schwartzmeyer <an...@schwartzmeyer.com>
Authored: Mon Jul 10 10:56:53 2017 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Mon Jul 10 17:15:36 2017 -0700
----------------------------------------------------------------------
src/common/status_utils.hpp | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/d7eee2df/src/common/status_utils.hpp
----------------------------------------------------------------------
diff --git a/src/common/status_utils.hpp b/src/common/status_utils.hpp
index 36df84d..be0734d 100644
--- a/src/common/status_utils.hpp
+++ b/src/common/status_utils.hpp
@@ -31,15 +31,13 @@ inline bool WSUCCEEDED(int status)
inline std::string WSTRINGIFY(int status)
{
+ std::string message;
#ifdef __WINDOWS__
- // On Windows the exit codes are not standardized. The behaviour should
- // be defined to improve the diagnostic based on logs.
- // TODO(dpravat): MESOS-5417 tracks this improvement.
- LOG(WARNING) << "`WSTRINGIFY` has been called, but it is not implemented.";
-
- return "";
+ // NOTE: On Windows, exit codes are not standardized, so we cannot
+ // treat any exit codes differently.
+ message += "exited with status ";
+ message += stringify(status);
#else
- std::string message;
if (WIFEXITED(status)) {
message += "exited with status ";
message += stringify(WEXITSTATUS(status));
@@ -56,8 +54,8 @@ inline std::string WSTRINGIFY(int status)
message += "wait status ";
message += stringify(status);
}
- return message;
#endif // __WINDOWS__
+ return message;
}
#endif // __STATUS_UTILS_HPP__