tree-wide: port users over to use new ERRNO_IS_ACCEPT_AGAIN() call

This commit is contained in:
Lennart Poettering
2019-04-10 22:11:18 +02:00
parent fb0302ddbc
commit 4ff9bc2ea6
10 changed files with 72 additions and 51 deletions
+5 -1
View File
@@ -271,8 +271,12 @@ static int do_accept(const char* name, char **argv, char **envp, int fd) {
_cleanup_close_ int fd_accepted = -1;
fd_accepted = accept4(fd, NULL, NULL, 0);
if (fd_accepted < 0)
if (fd_accepted < 0) {
if (ERRNO_IS_ACCEPT_AGAIN(errno))
return 0;
return log_error_errno(errno, "Failed to accept connection on fd:%d: %m", fd);
}
(void) getsockname_pretty(fd_accepted, &local);
(void) getpeername_pretty(fd_accepted, true, &peer);