* \param n The highest-numbered descriptor in any of the two sets, plus 1.
* \param readfds fds that should be checked for readability.
* \param writefds fds that should be checked for writablility.
* \param n The highest-numbered descriptor in any of the two sets, plus 1.
* \param readfds fds that should be checked for readability.
* \param writefds fds that should be checked for writablility.
*
* \return The return value of the underlying select() call on success, the
* negative system error code on errors.
*
* \return The return value of the underlying select() call on success, the
* negative system error code on errors.
-int para_select(int n, fd_set *readfds, fd_set *writefds,
- struct timeval *timeout_tv)
+int para_select(int n, fd_set *readfds, fd_set *writefds, int timeout)
- ret = select(n, readfds, writefds, NULL, timeout_tv);
+ ret = select(n, readfds, writefds, NULL, &tv);
- tv.tv_sec = 0;
- tv.tv_usec = 0;
- return para_select(fd + 1, NULL, &wfds, &tv);
+ return para_select(fd + 1, NULL, &wfds, 0);