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

index c8ac5db..02764dd 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();
 }
@@ -1507,6 +1509,7 @@ void *handle_keyboard(void *p)
                        } else {
                                resume_display();
                        }
+                       break;
                case 'r':
                        toggle_pref_panel();
                        break;
index 8a3416c..26faf1d 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.032375 seconds and 4 git commands to generate.