diff --git a/test/pitytest11/src/PityUnit.hh b/test/pitytest11/src/PityUnit.hh index 7877a7b..d5f3488 100644 --- a/test/pitytest11/src/PityUnit.hh +++ b/test/pitytest11/src/PityUnit.hh @@ -98,8 +98,8 @@ namespace pEp { void _createTransport(); // Query - bool _isProcessUnit() const; - bool _isRootUnit() const; + bool _isProcessUnit() const; // true if it forks + bool _isRootUnit() const; // true if has no parent std::string _rootUnitDir(); @@ -119,10 +119,11 @@ namespace pEp { static std::string _global_root_dir; std::map&> _children; // map to guarantee uniqueness of sibling-names int procUnitNr; - static int procUnitsCount; // will be increased in everuy constructor + static int procUnitsCount; // will be increased in every constructor std::shared_ptr _transport; //only ever read via transport() Endpoints _transport_endpoints; // only ever access via transportEndpoints() + // fs-mutex to sync across processes std::shared_ptr _log_mutex = nullptr; // internal logging Adapter::pEpLog::pEpLogger& m4gic_logger_n4me = logger_debug; diff --git a/test/pitytest11/src/PityUnit.hxx b/test/pitytest11/src/PityUnit.hxx index 2c51375..2e6af92 100644 --- a/test/pitytest11/src/PityUnit.hxx +++ b/test/pitytest11/src/PityUnit.hxx @@ -517,15 +517,15 @@ namespace pEp { case 0: return Utils::Color::WHITE; case 1: - return Utils::Color::CYAN; + return Utils::Color::GREEN; case 2: - return Utils::Color::MAGENTA; + return Utils::Color::YELLOW; case 3: - return Utils::Color::BLUE; + return Utils::Color::CYAN; case 4: - return Utils::Color::GREEN; + return Utils::Color::BLUE; case 5: - return Utils::Color::YELLOW; + return Utils::Color::MAGENTA; case 6: return Utils::Color::RED; default: @@ -542,6 +542,7 @@ namespace pEp { template void PityUnit::_logRaw(const std::string &msg) const { + // fs-mutex to sync across processes _log_mutex->aquire(); Adapter::pEpLog::log(msg, _termColor()); _log_mutex->release();