compensate for strange socket bug in macos

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10257 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2008-11-05 18:29:18 +00:00
parent 25b2a61721
commit 0cd4cf99bf
1 changed files with 5 additions and 0 deletions

View File

@ -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;