Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

make poll() work on platforms that can't recv() on a non-socket

This way it just got added to gnulib too the other day.

Signed-off-by: Joachim Schmitz <jojo@schmitz-digital.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information...
commit a6772946a554ad97ea4f6febbff3b98fbaa2f5bf 1 parent 32fde65
@Jojo-Schmitz Jojo-Schmitz authored gitster committed
Showing with 4 additions and 0 deletions.
  1. +4 −0 compat/poll/poll.c
View
4 compat/poll/poll.c
@@ -306,6 +306,10 @@ compute_revents (int fd, int sought, fd_set *rfds, fd_set *wfds, fd_set *efds)
|| socket_errno == ECONNABORTED || socket_errno == ENETRESET)
happened |= POLLHUP;
+ /* some systems can't use recv() on non-socket, including HP NonStop */
+ else if (/* (r == -1) && */ socket_errno == ENOTSOCK)
+ happened |= (POLLIN | POLLRDNORM) & sought;
+
else
happened |= POLLERR;
}
Please sign in to comment.
Something went wrong with that request. Please try again.