summaryrefslogtreecommitdiffstats
path: root/tdekbdledsync
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2015-09-19 18:24:10 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2015-09-19 18:24:10 -0500
commit5351547aede0aef696099c10305c20d6b5d09ac0 (patch)
tree7ede54d319f654984bd75780728a4b40094c72b3 /tdekbdledsync
parenta2af4533d38cb3fea416f202d6cc71b926bf59f0 (diff)
downloadtdebase-5351547aede0aef696099c10305c20d6b5d09ac0.tar.gz
tdebase-5351547aede0aef696099c10305c20d6b5d09ac0.zip
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
Diffstat (limited to 'tdekbdledsync')
-rw-r--r--tdekbdledsync/main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tdekbdledsync/main.cpp b/tdekbdledsync/main.cpp
index a439ebd41..ccbb66b84 100644
--- a/tdekbdledsync/main.cpp
+++ b/tdekbdledsync/main.cpp
@@ -440,6 +440,11 @@ int main() {
}
}
}
+ 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;