Skip to content

Commit

Permalink
Avoid bogus journal filling errors
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jnovy committed Dec 6, 2024
1 parent 680af40 commit 02c6ea6
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 02c6ea6

Please sign in to comment.