summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2013-04-30 15:44:37 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2013-05-07 09:41:14 +1000
commit042c6d861f7bb7038ddcdd6b59766fd9094d0e52 (patch)
tree84d86d91ae87263d7f63e5bea44dda741a7f1694 /os
parentd9848fb4b182ca21bacf28ed7410d1a502cb000e (diff)
os: Use ErrorFSigSafe from FatalError and it's friends
Backtrace logging etc. is already sigsafe, but the actual FatalError message in response is not yet, leading to amusing logs like this: (EE) Segmentation fault at address 0x0 (EE) BUG: triggered 'if (inSignalContext)' (EE) BUG: log.c:499 in LogVMessageVerb() (EE) Warning: attempting to log data in a signal unsafe manner while in signal context. Please update to check inSignalContext and/or use LogMessageVerbSigSafe() or ErrorFSigSafe(). The offending log format message is: Fatal server error: Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'os')
-rw-r--r--os/log.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/os/log.c b/os/log.c
index 3dc675f5c..f19faf5ee 100644
--- a/os/log.c
+++ b/os/log.c
@@ -250,7 +250,7 @@ void
LogClose(enum ExitCode error)
{
if (logFile) {
- ErrorF("Server terminated %s (%d). Closing log file.\n",
+ ErrorFSigSafe("Server terminated %s (%d). Closing log file.\n",
(error == EXIT_NO_ERROR) ? "successfully" : "with error", error);
fclose(logFile);
logFile = NULL;
@@ -878,9 +878,9 @@ FatalError(const char *f, ...)
static Bool beenhere = FALSE;
if (beenhere)
- ErrorF("\nFatalError re-entered, aborting\n");
+ ErrorFSigSafe("\nFatalError re-entered, aborting\n");
else
- ErrorF("\nFatal server error:\n");
+ ErrorFSigSafe("\nFatal server error:\n");
va_start(args, f);
@@ -897,9 +897,9 @@ FatalError(const char *f, ...)
va_end(apple_args);
}
#endif
- VErrorF(f, args);
+ VErrorFSigSafe(f, args);
va_end(args);
- ErrorF("\n");
+ ErrorFSigSafe("\n");
if (!beenhere)
OsVendorFatalError(f, args2);
va_end(args2);