diff options
author | mturk <mturk@13f79535-47bb-0310-9956-ffa450edef68> | 2009-02-12 13:26:11 +0000 |
---|---|---|
committer | mturk <mturk@13f79535-47bb-0310-9956-ffa450edef68> | 2009-02-12 13:26:11 +0000 |
commit | 764cb56c0ad3b1b7919fe00665fc9a0b9289e9d2 (patch) | |
tree | 2a9bee9f41ecc159bfa200595dbdae93c0fee505 /poll | |
parent | 4124694191d6a36240cc91b3ae68ce5a144ae2f8 (diff) | |
download | libapr-764cb56c0ad3b1b7919fe00665fc9a0b9289e9d2.tar.gz |
Fix core on win32 when using wakeable pollset
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@743730 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poll')
-rw-r--r-- | poll/unix/select.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/poll/unix/select.c b/poll/unix/select.c index 4780665b0..c3ad8cd7b 100644 --- a/poll/unix/select.c +++ b/poll/unix/select.c @@ -195,6 +195,9 @@ apr_file_socket_pipe_create(apr_file_t **in, apr_file_t **out, apr_pool_t *p); +extern apr_status_t +apr_file_socket_pipe_close(apr_file_t *file); + /* Create a dummy wakeup socket pipe for interrupting the poller */ static apr_status_t create_wakeup_pipe(apr_pollset_t *pollset) @@ -218,6 +221,12 @@ static apr_status_t create_wakeup_pipe(apr_pollset_t *pollset) { return APR_ENOTIMPL; } + +static apr_status_t apr_file_socket_pipe_close(apr_file_t *file) +{ + return APR_ENOTIMPL; +} + #endif /* WIN32 */ #else /* APR_FILES_AS_SOCKETS */ @@ -265,11 +274,19 @@ static apr_status_t wakeup_pipe_cleanup(void *p) if (pollset->flags & APR_POLLSET_WAKEABLE) { /* Close both sides of the wakeup pipe */ if (pollset->wakeup_pipe[0]) { +#if APR_FILES_AS_SOCKETS apr_file_close(pollset->wakeup_pipe[0]); +#else + apr_file_socket_pipe_close(pollset->wakeup_pipe[0]); +#endif pollset->wakeup_pipe[0] = NULL; } if (pollset->wakeup_pipe[1]) { +#if APR_FILES_AS_SOCKETS apr_file_close(pollset->wakeup_pipe[1]); +#else + apr_file_socket_pipe_close(pollset->wakeup_pipe[1]); +#endif pollset->wakeup_pipe[1] = NULL; } } |