[PATCH xserver] os: Initialize NotifyFds earlier in startup

Keith Packard keithp at keithp.com
Tue May 31 16:40:13 UTC 2016


If the server calls AbortServer during the first-time initialization
(which can happen if you start the server on an already using
DISPLAY), then the dbus code will shut down and call the notify fd
interface. If the notify fd list hasn't been initialized, the server
will crash.

Signed-off-by: Keith Packard <keithp at keithp.com>
---
 os/osinit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/os/osinit.c b/os/osinit.c
index 54b39a0..629fef5 100644
--- a/os/osinit.c
+++ b/os/osinit.c
@@ -195,6 +195,7 @@ OsInit(void)
 #ifdef BUSFAULT
         busfault_init();
 #endif
+        InitNotifyFds();
 
 #ifdef HAVE_BACKTRACE
         /*
@@ -314,7 +315,6 @@ OsInit(void)
         LockServer();
         been_here = TRUE;
     }
-    InitNotifyFds();
     TimerInit();
     OsVendorInit();
     OsResetSignals();
-- 
2.8.1



More information about the xorg-devel mailing list