MCPcopy Create free account
hub / github.com/F-Stack/f-stack / acceptUnixHandler

Function acceptUnixHandler

app/redis-6.2.6/src/networking.c:1165–1183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1163}
1164
1165void acceptUnixHandler(aeEventLoop *el, int fd, void *privdata, int mask) {
1166 int cfd, max = MAX_ACCEPTS_PER_CALL;
1167 UNUSED(el);
1168 UNUSED(mask);
1169 UNUSED(privdata);
1170
1171 while(max--) {
1172 cfd = anetUnixAccept(server.neterr, fd);
1173 if (cfd == ANET_ERR) {
1174 if (errno != EWOULDBLOCK)
1175 serverLog(LL_WARNING,
1176 "Accepting client connection: %s", server.neterr);
1177 return;
1178 }
1179 anetCloexec(cfd);
1180 serverLog(LL_VERBOSE,"Accepted connection to %s", server.unixsocket);
1181 acceptCommonHandler(connCreateAcceptedSocket(cfd),CLIENT_UNIX_SOCKET,NULL);
1182 }
1183}
1184
1185void freeClientOriginalArgv(client *c) {
1186 /* We didn't rewrite this client */

Callers

nothing calls this directly

Calls 4

anetUnixAcceptFunction · 0.85
anetCloexecFunction · 0.85
acceptCommonHandlerFunction · 0.85
connCreateAcceptedSocketFunction · 0.85

Tested by

no test coverage detected