4 extern const char *status_item_list[NUM_STAT_ITEMS];
7 int para_open_audiod_pipe(char *cmd)
9 int fds[3] = {0, 1, 0};
11 int ret = para_exec_cmdline_pid(&pid, cmd, fds);
14 ret = mark_fd_nonblock(fds[1]);
21 int read_audiod_pipe(int fd, void (*line_handler)(char *) )
23 static char buf[STRINGSIZE];
24 const ssize_t bufsize = sizeof(buf) - 1;
25 static ssize_t loaded;
28 if (loaded >= bufsize)
30 ret = read(fd, buf + loaded, bufsize - loaded);
34 loaded = for_each_line(buf, loaded, line_handler);