Explorar el Código

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

master
Arun Prakash Jana hace 8 años
padre
commit
16f0054b48
No se encontró ninguna clave conocida en la base de datos para esta firma ID de clave GPG: A75979F35C080412
Se han modificado 1 ficheros con 2 adiciones y 4 borrados
  1. +2
    -4
      nnn.c

+ 2
- 4
nnn.c Ver fichero

@@ -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;
}


Cargando…
Cancelar
Guardar