* fhandler_socket.cc (fhandler_socket::recvfrom): Just return 0 (EOF)

in case of WSAESHUTDOWN.
	(fhandler_socket::recvmsg): Ditto.
	* poll.cc (poll): Set revents to POLLIN instead of POLLHUP. Add comment.
This commit is contained in:
Corinna Vinschen
2005-11-13 16:24:40 +00:00
parent 5f27904928
commit 6ba3f6bb2d
3 changed files with 22 additions and 2 deletions

View File

@@ -118,8 +118,11 @@ poll (struct pollfd *fds, unsigned int nfds, int timeout)
else
fds[i].revents |= POLLIN;
break;
case 0: /* Closed on the read side. */
fds[i].revents |= POLLHUP;
case 0: /* Closed on the read side... */
/* ...or shutdown(SHUT_WR) on the write side.
We set revents to POLLHUP until 1.5.18, but
this is semantically borderline. */
fds[i].revents |= POLLIN;
break;
default:
fds[i].revents |= POLLIN;