aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-02-24 13:03:30 +0000
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-03-17 09:40:37 +0100
commitf315ae066598d0dc955db081f8d0faf8d358292d (patch)
tree1942909531fe17bb60bd1e4601d7455b19b5c177 /nx-X11/programs
parent761d74a6805e1030f2206a50834b36d807e8e107 (diff)
downloadnx-libs-f315ae066598d0dc955db081f8d0faf8d358292d.tar.gz
nx-libs-f315ae066598d0dc955db081f8d0faf8d358292d.tar.bz2
nx-libs-f315ae066598d0dc955db081f8d0faf8d358292d.zip
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: Keith Packard <keithp@keithp.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Diffstat (limited to 'nx-X11/programs')
-rw-r--r--nx-X11/programs/Xserver/os/osinit.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/nx-X11/programs/Xserver/os/osinit.c b/nx-X11/programs/Xserver/os/osinit.c
index e1986a577..08fbb8c89 100644
--- a/nx-X11/programs/Xserver/os/osinit.c
+++ b/nx-X11/programs/Xserver/os/osinit.c
@@ -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();