apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r743885 - /apr/apr/trunk/poll/unix/select.c
Date Thu, 12 Feb 2009 21:17:48 GMT
Author: mturk
Date: Thu Feb 12 21:17:48 2009
New Revision: 743885

URL: http://svn.apache.org/viewvc?rev=743885&view=rev
Log:
Use apr_file_socket_pipe_close for closing the WIN32 wakeup pipe

Modified:
    apr/apr/trunk/poll/unix/select.c

Modified: apr/apr/trunk/poll/unix/select.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/poll/unix/select.c?rev=743885&r1=743884&r2=743885&view=diff
==============================================================================
--- apr/apr/trunk/poll/unix/select.c (original)
+++ apr/apr/trunk/poll/unix/select.c Thu Feb 12 21:17:48 2009
@@ -195,6 +195,9 @@
                             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 @@
 {
     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 @@
     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;
         }
     }



Mime
View raw message