We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6599a0 commit 6656cf1Copy full SHA for 6656cf1
lldb/source/Host/common/Host.cpp
@@ -92,9 +92,11 @@ using namespace lldb_private;
92
#if !defined(_WIN32)
93
#include <syslog.h>
94
void Host::SystemLog(llvm::StringRef message) {
95
- openlog("lldb", LOG_CONS | LOG_PID | LOG_NDELAY, LOG_USER);
+ static llvm::once_flag g_openlog_once;
96
+ llvm::call_once(g_openlog_once, [] {
97
+ openlog("lldb", LOG_CONS | LOG_PID | LOG_NDELAY, LOG_USER);
98
+ });
99
syslog(LOG_INFO, "%s", message.data());
- closelog();
100
}
101
#else
102
void Host::SystemLog(llvm::StringRef message) { llvm::errs() << message; }
0 commit comments