Replaced EXIT(1) with EXIT(EXIT_FAILURE) in stout.

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


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

Branch: refs/heads/master
Commit: bbe7638255e04a5870b301baaec9b77319eb8bfe
Parents: b87f01b
Author: Alexander Rukletsov <ruklet...@gmail.com>
Authored: Mon Mar 7 14:02:08 2016 +0100
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Thu Mar 24 12:46:56 2016 +0100

----------------------------------------------------------------------
 3rdparty/libprocess/3rdparty/stout/include/stout/exit.hpp    | 2 +-
 .../libprocess/3rdparty/stout/include/stout/flags/flags.hpp  | 8 +++++---
 .../3rdparty/stout/include/stout/os/posix/fork.hpp           | 4 ++--
 3 files changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/bbe76382/3rdparty/libprocess/3rdparty/stout/include/stout/exit.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/include/stout/exit.hpp 
b/3rdparty/libprocess/3rdparty/stout/include/stout/exit.hpp
index 061e167..762864a 100644
--- a/3rdparty/libprocess/3rdparty/stout/include/stout/exit.hpp
+++ b/3rdparty/libprocess/3rdparty/stout/include/stout/exit.hpp
@@ -27,7 +27,7 @@
 // exiting. This is like glog's LOG(FATAL) or CHECK, except that it
 // does _not_ print a stack trace.
 //
-// Ex: EXIT(1) << "Cgroups are not present in this system.";
+// Ex: EXIT(EXIT_FAILURE) << "Cgroups are not present in this system.";
 #define EXIT(status) __Exit(status).stream()
 
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/bbe76382/3rdparty/libprocess/3rdparty/stout/include/stout/flags/flags.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/include/stout/flags/flags.hpp 
b/3rdparty/libprocess/3rdparty/stout/include/stout/flags/flags.hpp
index 96ffc42..3e43c01 100644
--- a/3rdparty/libprocess/3rdparty/stout/include/stout/flags/flags.hpp
+++ b/3rdparty/libprocess/3rdparty/stout/include/stout/flags/flags.hpp
@@ -503,10 +503,12 @@ void FlagsBase::add(
 inline void FlagsBase::add(const Flag& flag)
 {
   if (flags_.count(flag.name) > 0) {
-    EXIT(1) << "Attempted to add duplicate flag '" << flag.name << "'";
+    EXIT(EXIT_FAILURE)
+      << "Attempted to add duplicate flag '" << flag.name << "'";
   } else if (flag.name.find("no-") == 0) {
-    EXIT(1) << "Attempted to add flag '" << flag.name
-            << "' that starts with the reserved 'no-' prefix";
+    EXIT(EXIT_FAILURE)
+      << "Attempted to add flag '" << flag.name
+      << "' that starts with the reserved 'no-' prefix";
   }
 
   flags_[flag.name] = flag;

http://git-wip-us.apache.org/repos/asf/mesos/blob/bbe76382/3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/fork.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/fork.hpp 
b/3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/fork.hpp
index 8d8ed0b..a6e6767 100644
--- a/3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/fork.hpp
+++ b/3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/fork.hpp
@@ -369,8 +369,8 @@ private:
       // Execute the command (via '/bin/sh -c command').
       const char* command = exec.get().command.c_str();
       execlp("sh", "sh", "-c", command, (char*) NULL);
-      EXIT(1) << "Failed to execute '" << command
-              << "': " << os::strerror(errno);
+      EXIT(EXIT_FAILURE)
+        << "Failed to execute '" << command << "': " << os::strerror(errno);
     } else if (wait.isSome()) {
       foreach (pid_t pid, pids) {
         // TODO(benh): Check for signal interruption or other errors.

Reply via email to