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
(from parent 1:
aa4355f
)
socket: improve warning message when we get POLLHUP
author
Lennart Poettering
<lennart@poettering.net>
Tue, 26 Apr 2011 19:39:14 +0000
(21:39 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 26 Apr 2011 19:39:14 +0000
(21:39 +0200)
src/socket.c
patch
|
blob
|
history
diff --git
a/src/socket.c
b/src/socket.c
index ad67215c1fda24ca112409de6dfb413daa563117..0a18716cd752ab145f02832e4de7b17f90bdda25 100644
(file)
--- a/
src/socket.c
+++ b/
src/socket.c
@@
-1679,7
+1679,12
@@
static void socket_fd_event(Unit *u, int fd, uint32_t events, Watch *w) {
log_debug("Incoming traffic on %s", u->meta.id);
if (events != EPOLLIN) {
- log_error("%s: Got invalid poll event (0x%x) on socket.", u->meta.id, events);
+
+ if (events & EPOLLHUP)
+ log_error("%s: Got POLLHUP on a listening socket. The service probably invoked shutdown() on it, and should better not do that.", u->meta.id);
+ else
+ log_error("%s: Got unexpected poll event (0x%x) on socket.", u->meta.id, events);
+
goto fail;
}