From 0cd4cf99bf10053f2a372de0a755816f1968caa2 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 5 Nov 2008 18:29:18 +0000 Subject: [PATCH] compensate for strange socket bug in macos git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10257 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/xmlrpc-c/lib/abyss/src/socket_unix.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libs/xmlrpc-c/lib/abyss/src/socket_unix.c b/libs/xmlrpc-c/lib/abyss/src/socket_unix.c index 5d0bb0a360..623185269e 100644 --- a/libs/xmlrpc-c/lib/abyss/src/socket_unix.c +++ b/libs/xmlrpc-c/lib/abyss/src/socket_unix.c @@ -77,6 +77,10 @@ initInterruptPipe(interruptPipe * pipeP, static void termInterruptPipe(interruptPipe *pipeP) { if (pipeP->inuse) { + int x = 0; + write(pipeP->interruptorFd, &x, sizeof(x)); + usleep(500); + shutdown(pipeP->interrupteeFd, 2); sane_close(pipeP->interruptorFd); sane_close(pipeP->interrupteeFd); } @@ -310,6 +314,7 @@ channelWait(TChannel * const channelP, rc = poll(pollfds, ARRAY_SIZE(pollfds), timeoutMs == TIME_INFINITE ? -1 : timeoutMs); + if (rc < 0) { if (errno == EINTR) { failed = FALSE;