comparison dbutil.c @ 1049:01eea88963f3 fastopen

merge from default
author Matt Johnston <matt@ucc.asn.au>
date Sat, 28 Feb 2015 09:06:40 +0800
parents 0da8ba489c23 d3925ed45a85
children 36557295418e
comparison
equal deleted inserted replaced
1048:9cec9ed503bb 1049:01eea88963f3
502 } 502 }
503 #endif 503 #endif
504 504
505 /* make sure that the socket closes */ 505 /* make sure that the socket closes */
506 void m_close(int fd) { 506 void m_close(int fd) {
507 int val;
507 508
508 if (fd == -1) { 509 if (fd == -1) {
509 return; 510 return;
510 } 511 }
511 512
512 int val;
513 do { 513 do {
514 val = close(fd); 514 val = close(fd);
515 } while (val < 0 && errno == EINTR); 515 } while (val < 0 && errno == EINTR);
516 516
517 if (val < 0 && errno != EBADF) { 517 if (val < 0 && errno != EBADF) {