#include "net.h"
#include "daemon.h"
#include "string.h"
+#include "fd.h"
/** define the array of error lists needed by para_audiod */
INIT_AUDIOD_ERRLISTS;
ret = audiod_pre_select(&rfds, &wfds, &tv);
max_fileno = MAX(max_fileno, ret);
- ret = select(max_fileno + 1, &rfds, &wfds, NULL, &tv);
- if (ret < 0 && errno != EINTR)
- PARA_ERROR_LOG("select returned %d (%s)\n", ret,
- strerror(errno));
- if (audiod_status != AUDIOD_OFF)
- audiod_status_dump();
+ ret = para_select(max_fileno + 1, &rfds, &wfds, &tv);
if (ret < 0)
goto repeat;
+ if (audiod_status != AUDIOD_OFF)
+ audiod_status_dump();
audiod_post_select(ret, &rfds, &wfds);
/* read status pipe */
if (stat_pipe >=0 && FD_ISSET(stat_pipe, &rfds)) {