瀏覽代碼

Fix #34: use ~75% of max open file descs

master
Arun Prakash Jana 8 年之前
父節點
當前提交
16f0054b48
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: A75979F35C080412
共有 1 個文件被更改,包括 2 次插入4 次删除
  1. +2
    -4
      nnn.c

+ 2
- 4
nnn.c 查看文件

@@ -245,11 +245,9 @@ max_openfds()
limit = rl.rlim_cur;
rl.rlim_cur = rl.rlim_max;

/* Return ~75% of max possible */
if (setrlimit(RLIMIT_NOFILE, &rl) == 0)
return rl.rlim_max - 64;

if (limit > 128)
return limit - 64;
return (rl.rlim_max - (rl.rlim_max >> 2));

return 32;
}


Loading…
取消
儲存