summaryrefslogtreecommitdiffstats
path: root/tdekbdledsync/main.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-07-25 11:44:11 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-07-25 11:44:11 -0500
commit5305e40a0ab46ca2e0e05ea8667ab73541207e07 (patch)
treeaeb916a1f88814b91a42fc4dd3d7defcff46ecb3 /tdekbdledsync/main.cpp
parentf9c0d0e246edf07c25a4917bf201d61f49a53484 (diff)
downloadtdebase-5305e40a0ab46ca2e0e05ea8667ab73541207e07.tar.gz
tdebase-5305e40a0ab46ca2e0e05ea8667ab73541207e07.zip
Fix spontaneous tdekbdledsync abort on keyboard removal
Diffstat (limited to 'tdekbdledsync/main.cpp')
-rw-r--r--tdekbdledsync/main.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tdekbdledsync/main.cpp b/tdekbdledsync/main.cpp
index a22864f25..0096038a0 100644
--- a/tdekbdledsync/main.cpp
+++ b/tdekbdledsync/main.cpp
@@ -296,6 +296,9 @@ int main() {
// Get X server VT number
x11_vt_num = get_x_vtnum(display);
+ // Open console socket
+ vt_fd = getfd(NULL);
+
// Monitor for hotplugged keyboards
struct udev *udev;
struct udev_device *dev;
@@ -337,7 +340,6 @@ int main() {
while (1) {
// Get current active VT
- vt_fd = getfd(NULL);
if (ioctl(vt_fd, VT_GETSTATE, &vtstat)) {
fprintf(stderr, "[tdekbdledsync] Unable to get current VT!\n");
return -5;