cleanup exit path
authorJulien Desfossez <jdesfossez@efficios.com>
Fri, 17 Aug 2012 17:22:16 +0000 (13:22 -0400)
committerJulien Desfossez <jdesfossez@efficios.com>
Fri, 17 Aug 2012 17:22:16 +0000 (13:22 -0400)
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
src/cursesdisplay.c
src/lttngtop.c

index f80c5a613a92f4bc789c7c2fdcada8d25f4fbecb..c745713b6db2207920c2bd6d37684d5f260bd2a2 100644 (file)
@@ -75,11 +75,13 @@ void reset_ncurses()
        curs_set(1);
        endwin();
        quit = 1;
+       sem_post(&pause_sem);
+       sem_post(&timer);
+       sem_post(&goodtodisplay);
 }
 
 static void handle_sigterm(int signal)
 {
-       fprintf(stderr, "caugh signal\n");
        pthread_cancel(keyboard_thread);
        reset_ncurses();
 }
@@ -1506,6 +1508,7 @@ void *handle_keyboard(void *p)
                        } else {
                                resume_display();
                        }
+                       break;
                case 'r':
                        toggle_pref_panel();
                        break;
index 79e3e2c0cf262ec927ca5e7a23a22c89c679002d..89c0a1d3a225718aa9658408fc3d7d815781c217 100644 (file)
@@ -124,11 +124,12 @@ void *ncurses_display(void *p)
                sem_wait(&pause_sem);
 
                if (quit) {
+                       sem_post(&pause_sem);
+                       sem_post(&timer);
                        reset_ncurses();
                        pthread_exit(0);
                }
 
-
                copy = g_ptr_array_index(copies, current_display_index);
                assert(copy);
                display(current_display_index++);
This page took 0.024728 seconds and 4 git commands to generate.