[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#40023: 26.3 Emacs crashes when creating process if many file handles
From: |
Michael Albinus |
Subject: |
bug#40023: 26.3 Emacs crashes when creating process if many file handles are in use (e.g., when using ccls) |
Date: |
Sun, 12 Apr 2020 12:19:44 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Mattias Engdegård <mattiase@acm.org> writes:
> Actually reducing RLIMIT_NOFILE doesn't sound like a terrific idea --
> if anything, we need as many descriptors as we can get, in particular
> on macOS where kqueue uses up one per monitored file. If we are
> limited by FD_SETSIZE, then we shouldn't use select. Or am I missing
> something?
kqueue limits itself to (RLIMIT_NOFILE - 50) file descriptors. If 50
file descriptors aren't sufficient, we could increase that number, or
make it a defvar changeable via Lisp.
See line 397 of kqueue.c
Best regards, Michael.