- trfds = rfds_;
- twfds = wfds_;
- high = highfds_;
- }
-
- int ret = select(high+1, &trfds, &twfds, NULL, NULL);
-
- if (ret < 0) {
- if (errno == EINTR) {
- return;
- } else {
- perror("select:");
- jsl_log(JSL_DBG_OFF, "PollMgr::select_loop failure errno %d\n",errno);
- VERIFY(0);
- }
- }
-
- for (int fd = 0; fd <= high; fd++) {
- if (fd == pipefd_[0] && FD_ISSET(fd, &trfds)) {
- char tmp;
- VERIFY (read(pipefd_[0],&tmp,sizeof(tmp))==1);
- VERIFY(tmp==1);
- }else {
- if (FD_ISSET(fd, &twfds)) {
- writable->push_back(fd);
- }
- if (FD_ISSET(fd, &trfds)) {
- readable->push_back(fd);
- }
- }
- }
+ trfds = rfds_;
+ twfds = wfds_;
+ high = highfds_;
+ }
+
+ int ret = select(high+1, &trfds, &twfds, NULL, NULL);
+
+ if (ret < 0 && errno == EINTR)
+ return;
+ else if (ret < 0) {
+ perror("select:");
+ IF_LEVEL(0) LOG("select_loop failure errno " << errno);
+ VERIFY(0);
+ }
+
+ for (int fd = 0; fd <= high; fd++) {
+ if (fd == pipe_[0] && FD_ISSET(fd, &trfds)) {
+ char tmp;
+ VERIFY(pipe_[0].read(tmp)==1);
+ VERIFY(tmp==1);
+ } else {
+ if (FD_ISSET(fd, &twfds))
+ writable.push_back(fd);
+
+ if (FD_ISSET(fd, &trfds))
+ readable.push_back(fd);
+ }
+ }