Cleanup file descriptors and add more info

This commit is contained in:
topjohnwu
2017-07-08 23:51:58 +08:00
parent b9968aa1e6
commit b570b363d9
12 changed files with 41 additions and 53 deletions

View File

@@ -155,8 +155,8 @@ int xlisten(int sockfd, int backlog) {
return ret;
}
int xaccept(int sockfd, struct sockaddr *addr, socklen_t *addrlen) {
int fd = accept(sockfd, addr, addrlen);
int xaccept4(int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags) {
int fd = accept4(sockfd, addr, addrlen, flags);
if (fd == -1) {
PLOGE("accept");
}