summaryrefslogtreecommitdiff
path: root/socket.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-04-23 21:56:38 +0200
committerLennart Poettering <lennart@poettering.net>2010-04-23 21:56:38 +0200
commitdd5ad9d4e6f98b273150042f8facd41d76830923 (patch)
tree896378dce77aa72f8c1ae7d254b794cbce35f1ee /socket.c
parent2608882fe5438293f8a92050db3716242cde83fc (diff)
socket: don't call accept() on FIFOs ever
Diffstat (limited to 'socket.c')
-rw-r--r--socket.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/socket.c b/socket.c
index 827d7b5e97..b517344e70 100644
--- a/socket.c
+++ b/socket.c
@@ -119,9 +119,14 @@ static bool have_non_accept_socket(Socket *s) {
if (!s->accept)
return true;
- LIST_FOREACH(port, p, s->ports)
+ LIST_FOREACH(port, p, s->ports) {
+
+ if (p->type != SOCKET_SOCKET)
+ return true;
+
if (!socket_address_can_accept(&p->address))
return true;
+ }
return false;
}
@@ -450,6 +455,7 @@ static int socket_watch_fds(Socket *s) {
p->fd_watch.data.socket_accept =
s->accept &&
+ p->type == SOCKET_SOCKET &&
socket_address_can_accept(&p->address);
if ((r = unit_watch_fd(UNIT(s), p->fd, EPOLLIN, &p->fd_watch)) < 0)