Revert "select HUP"
authorStefan Metzmacher <metze@samba.org>
Fri, 1 Mar 2013 05:00:22 +0000 (06:00 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 4 Oct 2016 12:52:14 +0000 (14:52 +0200)
This reverts commit fa166fa83d136891c265441f1b20edaeca349b73.

lib/tevent/tevent_select.c

index 9c292ed84de558cca74b6c525ed5b6088ff66941..9dfe703793233de4d5bdcabc80bfae782176800c 100644 (file)
@@ -214,26 +214,8 @@ static int select_event_loop_select(struct select_event_context *select_ev, stru
                for (fde = select_ev->ev->fd_events; fde; fde = fde->next) {
                        uint16_t flags = 0;
 
-                       if (FD_ISSET(fde->fd, &r_fds)) {
-                               int saved_errno = errno;
-                               int available = 0;
-                               int ret;
-
-                               if (fde->flags & TEVENT_FD_READ) {
-                                       flags |= TEVENT_FD_READ;
-                               }
-
-                               /* support for POLLHUP */
-                               ret = ioctl(fde->fd, FIONREAD, &available);
-                               if ((ret == -1) || (available == 0)) {
-                                       /*
-                                        * We should not report TEVENT_FD_WRITE,
-                                        * after getting EOF.
-                                        */
-                                       fde->flags &= ~TEVENT_FD_WRITE;
-                               }
-                               errno = saved_errno;
-
+                       if (FD_ISSET(fde->fd, &r_fds) && (fde->flags & TEVENT_FD_READ)) {
+                               flags |= TEVENT_FD_READ;
                        }
                        if (FD_ISSET(fde->fd, &w_fds) && (fde->flags & TEVENT_FD_WRITE)) {
                                flags |= TEVENT_FD_WRITE;