If a process contained a log agent was forked to a new process, both processes shared the created sockets. If a process exit, the destructor of log agent will be invoked and all shared resources will be cleaned. It led the remain process can't write logs anymore. Solution is to clean the resources only if the number of user is zero. --- src/log/agent/lga_agent.cc | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/src/log/agent/lga_agent.cc b/src/log/agent/lga_agent.cc index e84ea3a28..2fb7dee08 100644 --- a/src/log/agent/lga_agent.cc +++ b/src/log/agent/lga_agent.cc @@ -166,6 +166,9 @@ LogAgent::LogAgent() { LogAgent::~LogAgent() { TRACE_ENTER(); ScopeLock scopeLock(mutex_); + if (lga_get_number_of_user() != 0) { + return; + } stop_recovery2_thread(); lga_shutdown(); -- 2.25.1 _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel