From 764cb56c0ad3b1b7919fe00665fc9a0b9289e9d2 Mon Sep 17 00:00:00 2001 From: mturk Date: Thu, 12 Feb 2009 13:26:11 +0000 Subject: 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 --- poll/unix/select.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'poll') 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; } } -- cgit v1.2.1