Commit f315ae06 authored by Mike Gabriel's avatar Mike Gabriel

os: Initialize NotifyFds earlier in startup

Backported from X.org: commit ce6546337487c052b5dd3c04d3d8d4b09d691c3d Author: Keith Packard <keithp@keithp.com> Date: Tue May 31 09:38:17 2016 -0700 os: Initialize NotifyFds earlier in startup 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: 's avatarKeith Packard <keithp@keithp.com> Reviewed-by: 's avatarPeter Hutterer <peter.hutterer@who-t.net> Backported-to-NX-by: 's avatarMike Gabriel <mike.gabriel@das-netzwerkteam.de>
parent 761d74a6
......@@ -101,10 +101,15 @@ OsInit(void)
#endif
if (!been_here) {
InitNotifyFds();
#if !defined(__SCO__) && !defined(__CYGWIN__) && !defined(__UNIXWARE__)
fclose(stdin);
fclose(stdout);
#endif
/*
* If a write of zero bytes to stderr returns non-zero, i.e. -1,
* then writing to stderr failed, and we'll write somewhere else
......@@ -203,7 +208,6 @@ OsInit(void)
#endif
been_here = TRUE;
}
InitNotifyFds();
TimerInit();
#ifdef DDXOSINIT
OsVendorInit();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment