summaryrefslogtreecommitdiff
path: root/poll
diff options
context:
space:
mode:
authorbnicholes <bnicholes@13f79535-47bb-0310-9956-ffa450edef68>2002-07-16 20:27:43 +0000
committerbnicholes <bnicholes@13f79535-47bb-0310-9956-ffa450edef68>2002-07-16 20:27:43 +0000
commitae26ab0b124b7d4bb8f86905a8b05fabbe2cef03 (patch)
tree9eec4a883d6d46bf67d77143c1a57935ed141b8d /poll
parent6dd104e36e8778c9015ce4ecacd3ea2b320f9ec2 (diff)
downloadlibapr-ae26ab0b124b7d4bb8f86905a8b05fabbe2cef03.tar.gz
NetWare uses a different select() call if the handle is pipe rather than a socket.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63692 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poll')
-rw-r--r--poll/unix/poll.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/poll/unix/poll.c b/poll/unix/poll.c
index 8188f2313..9b2deb5dc 100644
--- a/poll/unix/poll.c
+++ b/poll/unix/poll.c
@@ -157,6 +157,9 @@ APR_DECLARE(apr_status_t) apr_poll(apr_pollfd_t *aprset, int num, apr_int32_t *n
int rv, i;
int maxfd = -1;
struct timeval tv, *tvptr;
+#ifdef NETWARE
+ int is_pipe = 0;
+#endif
if (timeout < 0) {
tvptr = NULL;
@@ -179,6 +182,9 @@ APR_DECLARE(apr_status_t) apr_poll(apr_pollfd_t *aprset, int num, apr_int32_t *n
}
else if (aprset[i].desc_type == APR_POLL_FILE) {
fd = aprset[i].desc.f->filedes;
+#ifdef NETWARE
+ is_pipe = aprset[i].desc.f->is_pipe;
+#endif
}
if (aprset[i].reqevents & APR_POLLIN) {
FD_SET(fd, &readset);
@@ -195,8 +201,19 @@ APR_DECLARE(apr_status_t) apr_poll(apr_pollfd_t *aprset, int num, apr_int32_t *n
}
}
+#ifdef NETWARE
+ if (is_pipe) {
+ rv = pipe_select(maxfd + 1, &readset, &writeset, &exceptset, tvptr);
+ }
+ else {
+#endif
+
rv = select(maxfd + 1, &readset, &writeset, &exceptset, tvptr);
+#ifdef NETWARE
+ }
+#endif
+
(*nsds) = rv;
if ((*nsds) == 0) {
return APR_TIMEUP;