6ca226e6e0d468e953f3e1aac6cab52364f94ffb
5 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
, line_handler_t
*line_handler
)
23 static char buf
[4096];
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
, NULL
);