summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-01-12 05:09:24 +0100
committerLennart Poettering <lennart@poettering.net>2012-01-12 05:09:24 +0100
commit7c8bbccd071a9a12efdd8a7770b53d7786eb3a9c (patch)
tree474efa83c1f9f333e8f8df85c62981ce3c89ecf5
parent4cfa2c999dea269ddc646bfeba6c7f1021a73843 (diff)
journal: if the syslog forwarder socket is full, then don't block
-rw-r--r--src/journal/journald.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/journal/journald.c b/src/journal/journald.c
index 56cd31317e..f924c9353b 100644
--- a/src/journal/journald.c
+++ b/src/journal/journald.c
@@ -752,6 +752,11 @@ static void forward_syslog_iovec(Server *s, const struct iovec *iovec, unsigned
if (sendmsg(s->syslog_fd, &msghdr, MSG_NOSIGNAL) >= 0)
return;
+ /* The socket is full? I guess the syslog implementation is
+ * too slow, and we shouldn't wait for that... */
+ if (errno == EAGAIN)
+ return;
+
if (ucred && errno == ESRCH) {
struct ucred u;
@@ -765,6 +770,9 @@ static void forward_syslog_iovec(Server *s, const struct iovec *iovec, unsigned
if (sendmsg(s->syslog_fd, &msghdr, MSG_NOSIGNAL) >= 0)
return;
+
+ if (errno == EAGAIN)
+ return;
}
log_debug("Failed to forward syslog message: %m");