Lines Matching refs:pollfds
91 struct pollfd pollfds[2]; in pollinate() local
94 memset(pollfds, 0, 2*sizeof(struct pollfd)); in pollinate()
95 pollfds[0].events = pollfds[1].events = POLLIN; in pollinate()
96 pollfds[0].fd = in1; in pollinate()
97 pollfds[1].fd = in2; in pollinate()
101 if (!xpoll(pollfds, pollcount, timeout)) return pollcount; in pollinate()
104 if (pollfds[i].revents & POLLIN) { in pollinate()
105 int len = read(pollfds[i].fd, libbuf, sizeof(libbuf)); in pollinate()
106 if (len<1) pollfds[i].revents = POLLHUP; in pollinate()
109 if (pollfds[i].revents & POLLHUP) { in pollinate()
114 shutdown(pollfds[0].fd, SHUT_WR); in pollinate()