Branch: master

5351547a 2015-09-19 18:24:10 Timothy Pearson
Terminate keyboard LED sync daemon when Xorg server goes down
This resolves a bug where the number of running daemons would increase on every new X reservation, eventually consuming all available VTs
M tdekbdledsync/main.cpp
diff --git a/tdekbdledsync/main.cpp b/tdekbdledsync/main.cpp
index a439ebd..ccbb66b 100644
--- a/tdekbdledsync/main.cpp
+++ b/tdekbdledsync/main.cpp
@@ -440,6 +440,11 @@
 						}
 					}
 				}
+				else {
+					// Ensure the X server is still alive
+					// If the X server has terminated, this will fail and the program will terminate
+					XSync(display, False);
+				}
 
 				// Check the hotplug monitoring process to see if any keyboards were added or removed
 				fd_set readfds;