You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "rm5248 (via GitHub)" <gi...@apache.org> on 2023/04/09 19:16:33 UTC

[GitHub] [logging-log4cxx] rm5248 commented on issue #198: Some thread errors when user user send signals to application

rm5248 commented on issue #198:
URL: https://github.com/apache/logging-log4cxx/issues/198#issuecomment-1501195099

   How are you exiting your application?  Are you calling `exit()` from a non-main thread?
   
   There are known issues that can sometimes occur when you call `exit()` from a thread that is not the main thread(and perhaps if you call `exit()` before all of the other threads have exited) due to how the loggers/library is initialized(using the `static` keyword).  Unfortunately there doesn't seem to be a way to fix that - when `exit()` is called, the destructors will run in some sort of random order, while other threads may or may not still be logging.
   
   The manual section on [threading](https://logging.staged.apache.org/log4cxx/latest_stable/threading.html) has some more information.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org