Replace status item STATUS_BAR to BASENAME.
[paraslash.git] / gui.c
diff --git a/gui.c b/gui.c
index d8e200342fc991380445b6fa120ac2d2560bb05e..7dab4466beb0e4b1ecb7f5d007ed0f7bf89db9d6 100644 (file)
--- a/gui.c
+++ b/gui.c
@@ -6,9 +6,9 @@
 
 /** \file gui.c ncurses-based interface for paraslash */
 
+#include <signal.h>
 #include <sys/types.h>
 #include <dirent.h>
-
 #include "gui.cmdline.h"
 #include "para.h"
 #include "gui.h"
@@ -726,10 +726,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;
@@ -917,8 +918,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();
                }