MCPcopy Create free account
hub / github.com/DeNA/HandlerSocket-Plugin-for-MySQL / check_nfile

Function check_nfile

handlersocket/hstcpsvr.cpp:54–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

hstcpsvrMethod · 0.85

Calls 1

fatal_abortFunction · 0.85

Tested by

no test coverage detected