X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=gui.c;h=40d521bcf81ceb546a9675b5729c182109a07cf6;hb=81b9f55a3b231cef27073d02098178895386077d;hp=f884e8643140fcb0145bb0a7a193a36618e96b9e;hpb=cf1e416e5db97f1673521a63dacaa1487fb875d7;p=paraslash.git diff --git a/gui.c b/gui.c index f884e864..40d521bc 100644 --- a/gui.c +++ b/gui.c @@ -23,7 +23,6 @@ /** define the array of error lists needed by para_gui */ INIT_GUI_ERRLISTS; -extern const char *status_item_list[NUM_STAT_ITEMS]; static char *stat_content[NUM_STAT_ITEMS]; #define STANDARD_STATUS_BAR "para_gui " PACKAGE_VERSION " (hit ? for help)" @@ -490,7 +489,7 @@ static void setup_signal_handling(void) para_install_sighandler(SIGCHLD); para_install_sighandler(SIGWINCH); para_install_sighandler(SIGUSR1); - signal(SIGPIPE, SIG_IGN); +// signal(SIGPIPE, SIG_IGN); signal(SIGHUP, SIG_IGN); } @@ -726,10 +725,11 @@ static void init_curses(void) static void check_sigchld(void) { + int ret; pid_t pid; reap_next_child: - pid = para_reap_child(); - if (pid <= 0) + ret = para_reap_child(&pid); + if (ret <= 0) return; if (pid == cmd_pid) { cmd_pid = 0; @@ -748,7 +748,7 @@ static int check_stat_line(char *line, __a_unused void *data) // PARA_INFO_LOG("%s: checking: %s\n", __func__, line); i = stat_line_valid(line); if (i >= 0) { - line += strlen(status_item_list[i]) + 1; + line += strlen(status_item_list[i]) + 2; free(stat_content[i]); stat_content[i] = para_strdup(line); print_stat_item(i); @@ -917,8 +917,8 @@ repeat: close(audiod_pipe); audiod_pipe = -1; clear_all_items(); - free(stat_content[SI_STATUS_BAR]); - stat_content[SI_STATUS_BAR] = + free(stat_content[SI_BASENAME]); + stat_content[SI_BASENAME] = para_strdup("audiod not running!?"); print_all_items(); }