Lines 82-91
Link Here
|
82 |
return NULL; |
82 |
return NULL; |
83 |
pPipeImpl->m_nRefCount =1; |
83 |
pPipeImpl->m_nRefCount =1; |
84 |
pPipeImpl->m_bClosed = false; |
84 |
pPipeImpl->m_bClosed = false; |
85 |
#if defined(LINUX) |
85 |
#if CLOSESOCKET_DOESNT_WAKE_UP_ACCEPT |
86 |
pPipeImpl->m_bIsInShutdown = false; |
86 |
pPipeImpl->m_bIsInShutdown = false; |
87 |
pPipeImpl->m_bIsAccepting = false; |
87 |
pPipeImpl->m_bIsAccepting = false; |
88 |
#endif |
88 |
#endif /* CLOSESOCKET_DOESNT_WAKE_UP_ACCEPT */ |
89 |
return pPipeImpl; |
89 |
return pPipeImpl; |
90 |
} |
90 |
} |
91 |
|
91 |
|
Lines 359-365
Link Here
|
359 |
Thread does not return from accept on linux, so |
359 |
Thread does not return from accept on linux, so |
360 |
connect to the accepting pipe |
360 |
connect to the accepting pipe |
361 |
*/ |
361 |
*/ |
362 |
#if defined(LINUX) |
362 |
#if CLOSESOCKET_DOESNT_WAKE_UP_ACCEPT |
363 |
struct sockaddr_un addr; |
363 |
struct sockaddr_un addr; |
364 |
|
364 |
|
365 |
if ( pPipe->m_bIsAccepting ) |
365 |
if ( pPipe->m_bIsAccepting ) |
Lines 387-393
Link Here
|
387 |
} |
387 |
} |
388 |
close(fd); |
388 |
close(fd); |
389 |
} |
389 |
} |
390 |
#endif /* LINUX */ |
390 |
#endif /* CLOSESOCKET_DOESNT_WAKE_UP_ACCEPT */ |
391 |
|
391 |
|
392 |
nRet = shutdown(ConnFD, 2); |
392 |
nRet = shutdown(ConnFD, 2); |
393 |
if ( nRet < 0 ) |
393 |
if ( nRet < 0 ) |
Lines 421-433
Link Here
|
421 |
|
421 |
|
422 |
OSL_ASSERT(strlen(pPipe->m_Name) > 0); |
422 |
OSL_ASSERT(strlen(pPipe->m_Name) > 0); |
423 |
|
423 |
|
424 |
#if defined(LINUX) |
424 |
#if CLOSESOCKET_DOESNT_WAKE_UP_ACCEPT |
425 |
pPipe->m_bIsAccepting = true; |
425 |
pPipe->m_bIsAccepting = true; |
426 |
#endif |
426 |
#endif |
427 |
|
427 |
|
428 |
s = accept(pPipe->m_Socket, NULL, NULL); |
428 |
s = accept(pPipe->m_Socket, NULL, NULL); |
429 |
|
429 |
|
430 |
#if defined(LINUX) |
430 |
#if CLOSESOCKET_DOESNT_WAKE_UP_ACCEPT |
431 |
pPipe->m_bIsAccepting = false; |
431 |
pPipe->m_bIsAccepting = false; |
432 |
#endif |
432 |
#endif |
433 |
|
433 |
|
Lines 437-449
Link Here
|
437 |
return NULL; |
437 |
return NULL; |
438 |
} |
438 |
} |
439 |
|
439 |
|
440 |
#if defined(LINUX) |
440 |
#if CLOSESOCKET_DOESNT_WAKE_UP_ACCEPT |
441 |
if ( pPipe->m_bIsInShutdown ) |
441 |
if ( pPipe->m_bIsInShutdown ) |
442 |
{ |
442 |
{ |
443 |
close(s); |
443 |
close(s); |
444 |
return NULL; |
444 |
return NULL; |
445 |
} |
445 |
} |
446 |
#endif /* LINUX */ |
446 |
#endif /* CLOSESOCKET_DOESNT_WAKE_UP_ACCEPT */ |
447 |
else |
447 |
else |
448 |
{ |
448 |
{ |
449 |
/* alloc memory */ |
449 |
/* alloc memory */ |