From 5305e40a0ab46ca2e0e05ea8667ab73541207e07 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 25 Jul 2013 11:44:11 -0500 Subject: Fix spontaneous tdekbdledsync abort on keyboard removal --- tdekbdledsync/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tdekbdledsync') 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; -- cgit v1.2.1