summaryrefslogtreecommitdiff
path: root/src/activate
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-04-10 19:50:53 +0200
committerLennart Poettering <lennart@poettering.net>2019-04-10 22:11:18 +0200
commit4ff9bc2ea6e5daf08b5c9de17c0dcf16c3b7379e (patch)
tree138bbc253a16c0f32ec69f68f596d2d88d33aafd /src/activate
parentfb0302ddbc47f61349286abfe7fbaa12c7069e25 (diff)
downloadsystemd-4ff9bc2ea6e5daf08b5c9de17c0dcf16c3b7379e.tar.gz
systemd-4ff9bc2ea6e5daf08b5c9de17c0dcf16c3b7379e.tar.bz2
systemd-4ff9bc2ea6e5daf08b5c9de17c0dcf16c3b7379e.zip
tree-wide: port users over to use new ERRNO_IS_ACCEPT_AGAIN() call
Diffstat (limited to 'src/activate')
-rw-r--r--src/activate/activate.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/activate/activate.c b/src/activate/activate.c
index 1f1a9802ed..473366fb20 100644
--- a/src/activate/activate.c
+++ b/src/activate/activate.c
@@ -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);