summaryrefslogtreecommitdiff
path: root/poll
diff options
context:
space:
mode:
authormturk <mturk@13f79535-47bb-0310-9956-ffa450edef68>2008-04-21 12:04:08 +0000
committermturk <mturk@13f79535-47bb-0310-9956-ffa450edef68>2008-04-21 12:04:08 +0000
commit20eda48ca027ed0c08b10cfde8a6c6b3a732d1ce (patch)
tree1ffc557b3cd3f78efe6ca828e3e64f3fc19c652a /poll
parentb02f830dd2dc0229ba190610b4510aef7b7311ea (diff)
downloadlibapr-20eda48ca027ed0c08b10cfde8a6c6b3a732d1ce.tar.gz
Return APR_EINTR only there was no additional descriptors signaled at the time of wakeup call
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@650118 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poll')
-rw-r--r--poll/unix/epoll.c12
-rw-r--r--poll/unix/kqueue.c6
-rw-r--r--poll/unix/poll.c6
-rw-r--r--poll/unix/port.c6
-rw-r--r--poll/unix/select.c6
5 files changed, 12 insertions, 24 deletions
diff --git a/poll/unix/epoll.c b/poll/unix/epoll.c
index 82660b444..a8395fc2c 100644
--- a/poll/unix/epoll.c
+++ b/poll/unix/epoll.c
@@ -335,9 +335,6 @@ APR_DECLARE(apr_status_t) apr_pollset_poll(apr_pollset_t *pollset,
fd.desc_type == APR_POLL_FILE &&
fd.desc.f == pollset->wakeup_pipe[0]) {
drain_wakeup_pipe(pollset);
- /* XXX: Is this a correct return value ?
- * We might simply return APR_SUCEESS.
- */
rv = APR_EINTR;
}
else {
@@ -347,7 +344,8 @@ APR_DECLARE(apr_status_t) apr_pollset_poll(apr_pollset_t *pollset,
j++;
}
}
- (*num) = j;
+ if ((*num) = j)
+ rv = APR_SUCCESS;
}
else {
for (i = 0, j = 0; i < ret; i++) {
@@ -356,9 +354,6 @@ APR_DECLARE(apr_status_t) apr_pollset_poll(apr_pollset_t *pollset,
fd.desc_type == APR_POLL_FILE &&
fd.desc.f == pollset->wakeup_pipe[0]) {
drain_wakeup_pipe(pollset);
- /* XXX: Is this a correct return value ?
- * We might simply return APR_SUCEESS.
- */
rv = APR_EINTR;
}
else {
@@ -368,7 +363,8 @@ APR_DECLARE(apr_status_t) apr_pollset_poll(apr_pollset_t *pollset,
j++;
}
}
- (*num) = j;
+ if ((*num) = j)
+ rv = APR_SUCCESS;
}
if (descriptors) {
diff --git a/poll/unix/kqueue.c b/poll/unix/kqueue.c
index 1e98656d7..95519ddd2 100644
--- a/poll/unix/kqueue.c
+++ b/poll/unix/kqueue.c
@@ -326,9 +326,6 @@ APR_DECLARE(apr_status_t) apr_pollset_poll(apr_pollset_t *pollset,
fd.desc_type == APR_POLL_FILE &&
fd.desc.f == pollset->wakeup_pipe[0]) {
drain_wakeup_pipe(pollset);
- /* XXX: Is this a correct return value ?
- * We might simply return APR_SUCEESS.
- */
rv = APR_EINTR;
}
else {
@@ -339,7 +336,8 @@ APR_DECLARE(apr_status_t) apr_pollset_poll(apr_pollset_t *pollset,
j++;
}
}
- (*num) = j;
+ if ((*num) = j)
+ rv = APR_SUCCESS;
if (descriptors) {
*descriptors = pollset->result_set;
}
diff --git a/poll/unix/poll.c b/poll/unix/poll.c
index 25b45c269..29a5f6655 100644
--- a/poll/unix/poll.c
+++ b/poll/unix/poll.c
@@ -345,9 +345,6 @@ APR_DECLARE(apr_status_t) apr_pollset_poll(apr_pollset_t *pollset,
pollset->query_set[i].desc_type == APR_POLL_FILE &&
pollset->query_set[i].desc.f == pollset->wakeup_pipe[0]) {
drain_wakeup_pipe(pollset);
- /* XXX: Is this a correct return value ?
- * We might simply return APR_SUCEESS.
- */
rv = APR_EINTR;
}
else {
@@ -358,7 +355,8 @@ APR_DECLARE(apr_status_t) apr_pollset_poll(apr_pollset_t *pollset,
}
}
}
- (*num) = j;
+ if ((*num) = j)
+ rv = APR_SUCCESS;
}
if (descriptors && (*num))
*descriptors = pollset->result_set;
diff --git a/poll/unix/port.c b/poll/unix/port.c
index 2c1f839c2..f698e70fc 100644
--- a/poll/unix/port.c
+++ b/poll/unix/port.c
@@ -373,9 +373,6 @@ APR_DECLARE(apr_status_t) apr_pollset_poll(apr_pollset_t *pollset,
fd.desc_type == APR_POLL_FILE &&
fd.desc.f == pollset->wakeup_pipe[0]) {
drain_wakeup_pipe(pollset);
- /* XXX: Is this a correct return value ?
- * We might simply return APR_SUCEESS.
- */
rv = APR_EINTR;
}
else {
@@ -392,7 +389,8 @@ APR_DECLARE(apr_status_t) apr_pollset_poll(apr_pollset_t *pollset,
}
}
pollset_unlock_rings();
- (*num) = j;
+ if ((*num) = j)
+ rv = APR_SUCCESS;
if (descriptors) {
*descriptors = pollset->result_set;
}
diff --git a/poll/unix/select.c b/poll/unix/select.c
index 2d7364209..142453fb3 100644
--- a/poll/unix/select.c
+++ b/poll/unix/select.c
@@ -493,9 +493,6 @@ APR_DECLARE(apr_status_t) apr_pollset_poll(apr_pollset_t *pollset,
if ((pollset->flags & APR_POLLSET_WAKEABLE) &&
pollset->query_set[i].desc.f == pollset->wakeup_pipe[0]) {
drain_wakeup_pipe(pollset);
- /* XXX: Is this a correct return value ?
- * We might simply return APR_SUCEESS.
- */
rv = APR_EINTR;
continue;
}
@@ -523,7 +520,8 @@ APR_DECLARE(apr_status_t) apr_pollset_poll(apr_pollset_t *pollset,
j++;
}
}
- (*num) = j;
+ if ((*num) = j)
+ rv = APR_SUCCESS;
if (descriptors)
*descriptors = pollset->result_set;