loggerd: put signal in end of route sentinel (#21025)

This commit is contained in:
Willem Melching
2021-05-25 17:34:40 +02:00
committed by GitHub
parent ba5d6bbd70
commit 6e22f16ddb
5 changed files with 11 additions and 6 deletions
+3
View File
@@ -150,8 +150,10 @@ public:
#endif
};
inline static std::atomic<bool> power_failure = false;
inline static std::atomic<int> signal = 0;
inline operator bool() { return do_exit; }
inline ExitHandler& operator=(bool v) {
signal = 0;
do_exit = v;
return *this;
}
@@ -160,6 +162,7 @@ private:
#ifndef __APPLE__
power_failure = (sig == SIGPWR);
#endif
signal = sig;
do_exit = true;
}
inline static std::atomic<bool> do_exit = false;