Use distinguished exit status for unittests.

* Enabled a parametric exit status in Terminator::Exit().

* The unittest binary sets this exit status to 2, to distinguish it from
  other exit(1) calls in the code base.

BUG=chromium-os:29841
TEST=Build, passes unit tests.

Change-Id: I2bf6a834743e513a647ed7bb2266ef095064d6bc
Reviewed-on: https://gerrit.chromium.org/gerrit/21479
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Ready: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
diff --git a/terminator.h b/terminator.h
index b3fdba6..97c9d7f 100644
--- a/terminator.h
+++ b/terminator.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
@@ -16,6 +16,7 @@
  public:
   // Initializes the terminator and sets up signal handlers.
   static void Init();
+  static void Init(int exit_status);
 
   // Terminates the current process.
   static void Exit();
@@ -37,6 +38,7 @@
   // The signal handler.
   static void HandleSignal(int signum);
 
+  static volatile sig_atomic_t exit_status_;
   static volatile sig_atomic_t exit_blocked_;
   static volatile sig_atomic_t exit_requested_;
 };