Commit 0cf47b5a authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Reduce close-margin over highest known filedescriptor.

Fixes: #2844
parent 2ce13cf2
...@@ -180,18 +180,16 @@ mch_cli_panic_clear(struct cli *cli, const char * const *av, void *priv) ...@@ -180,18 +180,16 @@ mch_cli_panic_clear(struct cli *cli, const char * const *av, void *priv)
* *
* This is likely to a bit on the low side, as libc and other libraries * This is likely to a bit on the low side, as libc and other libraries
* has a tendency to cache file descriptors (syslog, resolver, etc.) * has a tendency to cache file descriptors (syslog, resolver, etc.)
* so we add a margin of 100 fds. * so we add a margin of 10 fds.
* *
* for added safety, we check that we see no file descriptor open for * For added safety, we check that we see no file descriptor open for
* another margin above the limit for which we close by design * another margin above the limit for which we close by design
*/ */
static int mgt_max_fd; static int mgt_max_fd;
#define CLOSE_FD_UP_TO (mgt_max_fd + 100) #define CLOSE_FD_UP_TO (mgt_max_fd + 10)
// XXX should work now - engage? #define CHECK_FD_UP_TO (CLOSE_FD_UP_TO + 10)
//#define CLOSE_FD_UP_TO mgt_max_fd
#define CHECK_FD_UP_TO (CLOSE_FD_UP_TO + 100)
void void
MCH_TrackHighFd(int fd) MCH_TrackHighFd(int fd)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment