| Index: terminator.h
|
| diff --git a/terminator.h b/terminator.h
|
| index 1c014ea79acece92bc52ce0f5383ceb36a0dd896..b3fdba68d2f3a959656914d54878feb351dbe1cc 100644
|
| --- a/terminator.h
|
| +++ b/terminator.h
|
| @@ -7,6 +7,8 @@
|
|
|
| #include <signal.h>
|
|
|
| +#include <gtest/gtest_prod.h> // for FRIEND_TEST
|
| +
|
| namespace chromeos_update_engine {
|
|
|
| // A class allowing graceful delayed exit.
|
| @@ -21,6 +23,7 @@ class Terminator {
|
| // Set to true if the terminator should block termination requests in an
|
| // attempt to block exiting.
|
| static void set_exit_blocked(bool block) { exit_blocked_ = block ? 1 : 0; }
|
| + static bool exit_blocked() { return exit_blocked_ != 0; }
|
|
|
| // Returns true if the system is trying to terminate the process, false
|
| // otherwise. Returns true only if exit was blocked when the termination
|
| @@ -28,6 +31,9 @@ class Terminator {
|
| static bool exit_requested() { return exit_requested_ != 0; }
|
|
|
| private:
|
| + FRIEND_TEST(TerminatorTest, HandleSignalTest);
|
| + FRIEND_TEST(TerminatorDeathTest, ScopedTerminatorExitUnblockerExitTest);
|
| +
|
| // The signal handler.
|
| static void HandleSignal(int signum);
|
|
|
|
|