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 c8ac5db55f93c8a990adcbd699f29d6dd3c5396e..02764dd19976996f13fb1f11a580531aa3285b60 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 8a3416c8dd6bf41659b695a458d2bd52c0c50993..26faf1de7d0344db0717e371f82b5bcd152fb1a4 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.02578 seconds and 4 git commands to generate.