MCPcopy Create free account
hub / github.com/MariaDB/server / check_nfile

Function check_nfile

plugin/handler_socket/handlersocket/hstcpsvr.cpp:52–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50namespace {
51
52void
53check_nfile(size_t nfile)
54{
55 struct rlimit rl;
56 const int r = getrlimit(RLIMIT_NOFILE, &rl);
57 if (r != 0) {
58 fatal_abort("check_nfile: getrlimit failed");
59 }
60 if (rl.rlim_cur < static_cast<rlim_t>(nfile + 1000)) {
61 fprintf(stderr,
62 "[Warning] handlersocket: open_files_limit is too small.\n");
63 }
64}
65
66};
67

Callers 1

hstcpsvrMethod · 0.85

Calls 1

fatal_abortFunction · 0.85

Tested by

no test coverage detected