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.
stderr
1 parent cfbf82e commit 1e38d40Copy full SHA for 1e38d40
libcxx/src/log_error.cpp
@@ -24,6 +24,9 @@ _LIBCPP_BEGIN_NAMESPACE_STD
24
namespace {
25
26
void log_security_failure(const char* message) noexcept {
27
+ // Always log the message to `stderr` in case the platform-specific system calls fail.
28
+ fprintf(stderr, "%s", message);
29
+
30
// On Apple platforms, use the `os_fault_with_payload` OS function that simulates a crash.
31
#if defined(__APPLE__) && __has_include(<os/reason_private.h>)
32
os_fault_with_payload(
@@ -42,9 +45,6 @@ void log_security_failure(const char* message) noexcept {
42
45
openlog("libc++", 0, 0);
43
46
syslog(LOG_CRIT, "%s", message);
44
47
closelog();
-
-#else
- fprintf(stderr, "%s", message);
48
#endif
49
}
50
0 commit comments