mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
Core: Socket handling EINTR
git-svn-id: svn://ultimatepp.org/upp/trunk@6804 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
d222342920
commit
1ece04ecb7
2 changed files with 3 additions and 4 deletions
|
|
@ -388,7 +388,7 @@ bool TcpSocket::Accept(TcpSocket& ls)
|
|||
socket = accept(ls.GetSOCKET(), NULL, NULL);
|
||||
if(socket != INVALID_SOCKET)
|
||||
break;
|
||||
if(!WouldBlock()) { // In prefork condition, Wait is not enough, as other process can accept
|
||||
if(!WouldBlock() && GetErrorCode() != SOCKERR(EINTR)) { // In prefork condition, Wait is not enough, as other process can accept
|
||||
SetSockError("accept");
|
||||
return false;
|
||||
}
|
||||
|
|
@ -614,7 +614,7 @@ bool TcpSocket::RawWait(dword flags, int end_time)
|
|||
FD_SET(socket, fdsetx);
|
||||
int avail = select((int)socket + 1, fdsetr, fdsetw, fdsetx, tvalp);
|
||||
LLOG("Wait select avail: " << avail);
|
||||
if(avail < 0) {
|
||||
if(avail < 0 && GetErrorCode() != SOCKERR(EINTR)) {
|
||||
SetSockError("wait");
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -188,8 +188,7 @@ void SkylarkApp::Run()
|
|||
|
||||
IpAddrInfo ipinfo;
|
||||
ipinfo.Execute(ip, port, IpAddrInfo::FAMILY_IPV4);
|
||||
// addrinfo *addr = ipinfo.GetResult();
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
int qq = 0;
|
||||
for(;;) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue