2 * Copyright (C) 2012-2020 all contributors <cmogstored-public@yhbt.net>
3 * License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
5 #include "cmogstored.h"
14 * FreeBSD (and other BSDs) may return ECONNRESET on close(),
15 * but the file descriptor _does_ seem to be released.
16 * Retrying close() will break since we create descriptors
17 * in different threads
19 case EINTR
: return; /* nothing we can do */
21 /* EBADF would be a disaster since we use threads */
22 syslog(LOG_CRIT
, "BUG: attempted to close(fd=%d)", fd
);
23 assert(0 && fd
&& "won't attempt to continue on bad close()");
24 default: /* EIO, nothing we can do... */
25 syslog(LOG_ERR
, "close(fd=%d) failed: %m", fd
);