[PATCH v7 14/15] Log in LoaderUnload() in a signal safe manner

Peter Hutterer peter.hutterer at who-t.net
Wed Jun 20 22:56:45 PDT 2012


From: Chase Douglas <chase.douglas at canonical.com>

The function may be called from a fatal signal handler.

Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 hw/xfree86/loader/loader.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/xfree86/loader/loader.c b/hw/xfree86/loader/loader.c
index b72b8b8..edaefb8 100644
--- a/hw/xfree86/loader/loader.c
+++ b/hw/xfree86/loader/loader.c
@@ -163,7 +163,7 @@ LoaderSymbol(const char *name)
 void
 LoaderUnload(const char *name, void *handle)
 {
-    xf86Msg(X_INFO, "Unloading %s\n", name);
+    LogMessageVerbSigSafe(X_INFO, 1, "Unloading %s\n", name);
     if (handle)
         dlclose(handle);
 }
-- 
1.7.10.2



More information about the xorg-devel mailing list