[systemd-commits] src/socket.c
Lennart Poettering
lennart at kemper.freedesktop.org
Tue Apr 26 12:39:23 PDT 2011
src/socket.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
New commits:
commit 641e01dcdcc810026ee4156d1694d97e10a1ba07
Author: Lennart Poettering <lennart at poettering.net>
Date: Tue Apr 26 21:39:14 2011 +0200
socket: improve warning message when we get POLLHUP
diff --git a/src/socket.c b/src/socket.c
index ad67215..0a18716 100644
--- 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;
}
More information about the systemd-commits
mailing list