From 22d0a673d7d6049d388847b476df1e5b6f3d6b70 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 27 Apr 2012 13:26:04 -0500 Subject: Check for tsak presence on lock engage Fix tsak not exiting on request Clean up build warnings --- tsak/main.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'tsak') diff --git a/tsak/main.cpp b/tsak/main.cpp index f0fe3b1a3..38ecbcf0b 100644 --- a/tsak/main.cpp +++ b/tsak/main.cpp @@ -108,7 +108,6 @@ void signal_callback_handler(int signum) { // Terminate program throw exit_exception(signum); - exit(signum); } /* termination handler */ @@ -395,7 +394,7 @@ int main (int argc, char *argv[]) struct input_event event; struct input_event revev; struct uinput_user_dev devinfo={{0},{0}}; - int devout[MAX_KEYBOARDS], rd, i, value, size = sizeof (struct input_event); + int devout[MAX_KEYBOARDS], rd, i, size = sizeof (struct input_event); char name[256] = "Unknown"; bool ctrl_down = false; bool alt_down = false; @@ -579,8 +578,6 @@ int main (int argc, char *argv[]) } } - value = ev[0].value; - if (ev[0].value == 0 && ev[0].type == 1) { // Read the key release event if (keycode[(ev[0].code)]) { if (strcmp(keycode[(ev[0].code)], "") == 0) ctrl_down = false; @@ -713,7 +710,7 @@ int main (int argc, char *argv[]) } } catch(exit_exception& e) { - exit(e.c); + tsak_friendly_termination(); } return 6; -- cgit v1.2.1