Repository: mesos Updated Branches: refs/heads/master a1712bd30 -> e80834526
Windows: Added logging for `WSTRINGIFY` calls. The return codes in Windows are not standardized. The function returns an empty string and logs a warning. Review: https://reviews.apache.org/r/47473/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/ad3e161a Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/ad3e161a Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/ad3e161a Branch: refs/heads/master Commit: ad3e161ac19ac32f5493e8b31bdef7b579c87177 Parents: a1712bd Author: Daniel Pravat <[email protected]> Authored: Mon May 30 17:48:47 2016 -0700 Committer: Joris Van Remoortere <[email protected]> Committed: Mon May 30 17:52:59 2016 -0700 ---------------------------------------------------------------------- src/common/status_utils.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/ad3e161a/src/common/status_utils.hpp ---------------------------------------------------------------------- diff --git a/src/common/status_utils.hpp b/src/common/status_utils.hpp index fa8dbf1..26b94d4 100644 --- a/src/common/status_utils.hpp +++ b/src/common/status_utils.hpp @@ -24,6 +24,14 @@ inline std::string WSTRINGIFY(int status) { +#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 ""; +#else std::string message; if (WIFEXITED(status)) { message += "exited with status "; @@ -33,6 +41,7 @@ inline std::string WSTRINGIFY(int status) message += strsignal(WTERMSIG(status)); } return message; +#endif // __WINDOWS__ } #endif // __STATUS_UTILS_HPP__
