summaryrefslogtreecommitdiff
path: root/poll
diff options
context:
space:
mode:
authorylavic <ylavic@13f79535-47bb-0310-9956-ffa450edef68>2021-11-10 14:20:57 +0000
committerylavic <ylavic@13f79535-47bb-0310-9956-ffa450edef68>2021-11-10 14:20:57 +0000
commit82081df78b64488c9a9e1b1c5bc45742590a57a0 (patch)
tree5a596bf941b259f2fb3a02015e26a7ba448ae679 /poll
parent257fd2ddf719a1fe73bf80d789fd62d77f728d12 (diff)
downloadlibapr-82081df78b64488c9a9e1b1c5bc45742590a57a0.tar.gz
Follow up to r1894914: non-blocking wakeup pipe reads on Windows too.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1894917 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poll')
-rw-r--r--poll/unix/wakeup.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/poll/unix/wakeup.c b/poll/unix/wakeup.c
index 7c4d4247a..01b84f9a9 100644
--- a/poll/unix/wakeup.c
+++ b/poll/unix/wakeup.c
@@ -36,6 +36,9 @@ apr_status_t apr_poll_create_wakeup_pipe(apr_pool_t *pool, apr_pollfd_t *pfd,
pool)) != APR_SUCCESS)
return rv;
+ /* Read end of the pipe is non-blocking */
+ apr_file_pipe_timeout_set(wakeup_pipe[0], 0);
+
pfd->reqevents = APR_POLLIN;
pfd->desc_type = APR_POLL_FILE;
pfd->desc.f = wakeup_pipe[0];
@@ -80,6 +83,7 @@ apr_status_t apr_poll_create_wakeup_pipe(apr_pool_t *pool, apr_pollfd_t *pfd,
{
apr_status_t rv;
+ /* Read end of the pipe is non-blocking */
if ((rv = apr_file_pipe_create_ex(&wakeup_pipe[0], &wakeup_pipe[1],
APR_WRITE_BLOCK,
pool)) != APR_SUCCESS)