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:
4cfa2c9
)
journal: if the syslog forwarder socket is full, then don't block
author
Lennart Poettering
<lennart@poettering.net>
Thu, 12 Jan 2012 04:09:24 +0000
(
05:09
+0100)
committer
Lennart Poettering
<lennart@poettering.net>
Thu, 12 Jan 2012 04:09:24 +0000
(
05:09
+0100)
src/journal/journald.c
patch
|
blob
|
history
diff --git
a/src/journal/journald.c
b/src/journal/journald.c
index 56cd31317e93f19eec92652163ed55beafe9f516..f924c9353b96a5bb0d4db1af2561b97691ebda56 100644
(file)
--- 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");