chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2608882
)
socket: don't call accept() on FIFOs ever
author
Lennart Poettering
<lennart@poettering.net>
Fri, 23 Apr 2010 19:56:38 +0000
(21:56 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Fri, 23 Apr 2010 19:56:38 +0000
(21:56 +0200)
socket.c
patch
|
blob
|
history
diff --git
a/socket.c
b/socket.c
index 827d7b5e97600f5771a5b7d828782e8da650702d..b517344e70ab19b52efb9a47677921c553373eab 100644
(file)
--- 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)