From 02c6ea6191555a4bd2873b4c75cbda0ec0a8b53a Mon Sep 17 00:00:00 2001 From: Jindrich Novy Date: Fri, 6 Dec 2024 05:04:08 +0100 Subject: [PATCH] Avoid bogus journal filling errors Issue #454 is likely caused by retryable_error() not catching all possible retriable errors from the write(2) syscall. This PR should be FeeBSD compatible. The only retriable result in question is ENOBUFS which might be bound to network latencies. Hope these are acceptable. Signed-off-by: Jindrich Novy --- src/utils.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/utils.c b/src/utils.c index 13c31845..1fb5ab0b 100644 --- a/src/utils.c +++ b/src/utils.c @@ -49,17 +49,10 @@ void set_conmon_logs(char *level_name, char *cid_, gboolean syslog_, char *tag) nexitf("No such log level %s", level_name); } -#ifdef __FreeBSD__ static bool retryable_error(int err) { - return err == EINTR || err == EAGAIN; + return err == EINTR || err == EAGAIN || err == ENOBUFS; } -#else -static bool retryable_error(int err) -{ - return err == EINTR; -} -#endif static void get_signal_descriptor_mask(sigset_t *set) {