mirror of
https://github.com/matrix-construct/construct
synced 2024-11-26 08:42:34 +01:00
ircd::fs: Condition to skip setrlimit(2) and infolog message.
This commit is contained in:
parent
13ea8b0ca0
commit
9fce3c6ca6
1 changed files with 4 additions and 0 deletions
|
@ -101,9 +101,13 @@ try
|
|||
{
|
||||
rlimit rlim[2] {0};
|
||||
syscall(getrlimit, RLIMIT_NOFILE, &rlim[0]);
|
||||
|
||||
rlim[1] = rlim[0];
|
||||
rlim[1].rlim_cur = std::max(rlim[1].rlim_cur, ulong(fs::rlimit_nofile));
|
||||
rlim[1].rlim_cur = std::min(rlim[1].rlim_cur, rlim[1].rlim_max);
|
||||
if(rlim[0].rlim_cur == rlim[1].rlim_cur)
|
||||
return;
|
||||
|
||||
syscall(setrlimit, RLIMIT_NOFILE, &rlim[1]);
|
||||
log::info
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue