mirror of
https://github.com/AuxXxilium/eudev.git
synced 2025-03-06 04:20:29 +07:00
journal: if the syslog forwarder socket is full, then don't block
This commit is contained in:
parent
4cfa2c999d
commit
7c8bbccd07
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user