Changeset 58292 in vbox for trunk/src/VBox
- Timestamp:
- Oct 17, 2015 10:04:46 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/posix/localipc-posix.cpp
r58290 r58292 640 640 641 641 642 #if 0 /* maybe later */643 642 /** 644 643 * Checks if the socket has has a HUP condition. … … 649 648 static bool rtLocalIpcPosixHasHup(PRTLOCALIPCSESSIONINT pThis) 650 649 { 651 # 650 #ifndef RT_OS_OS2 652 651 struct pollfd PollFd; 653 652 RT_ZERO(PollFd); … … 657 656 && (PollFd.revents & POLLHUP); 658 657 659 # else /* RT_OS_OS2: */ 660 return false; 661 # endif 662 } 658 #else /* RT_OS_OS2: */ 659 return true; 663 660 #endif 661 } 664 662 665 663 … … 693 691 694 692 rc = RTSocketRead(pThis->hSocket, pvBuffer, cbBuffer, pcbRead); 693 694 /* Detect broken pipe. */ 695 if (rc == VINF_SUCCESS) 696 { 697 if (!pcbRead || *pcbRead) 698 { /* likely */ } 699 else if (rtLocalIpcPosixHasHup(pThis)) 700 rc = VERR_BROKEN_PIPE; 701 } 702 else if (rc == VERR_NET_CONNECTION_RESET_BY_PEER || rc == VERR_NET_SHUTDOWN) 703 rc = VERR_BROKEN_PIPE; 695 704 696 705 int rc2 = RTCritSectEnter(&pThis->CritSect);
Note:
See TracChangeset
for help on using the changeset viewer.