diff options
-rw-r--r-- | ace/Log_Msg.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ace/Log_Msg.cpp b/ace/Log_Msg.cpp index a6b29688ff5..a1b51cc26db 100644 --- a/ace/Log_Msg.cpp +++ b/ace/Log_Msg.cpp @@ -754,6 +754,9 @@ ACE_Log_Msg::log (const ACE_TCHAR *format_str, if (this->log_priority_enabled (log_priority) == 0) return 0; + // Logging is a benign activity, so don't inadvertently smash errno. + ACE_Errno_Guard guard (errno); + ACE_Log_Record log_record (log_priority, ACE_OS::gettimeofday (), this->getpid ()); |