Subject: bug#22814: 25.0.91; Emacs runs out of file descriptors on OS X

From: Eli Zaretskii <[email-masked]>
Date: Sat, 27 Feb 2016 21:14:23 +0200

> Date: Sat, 27 Feb 2016 20:00:30 +0100
> From: Anders Lindgren <[email-masked]>
> Cc: Eli Zaretskii <[email-masked]>, [email-masked]
> 
> I don't think the problem is what kqueue does when it run out of file descriptors, but how the rest of the Emacs
> process acts when this happens. For example, can it even read and write files? Can subprocesses be
> started?

Even if it can't, it shouldn't hang.  It could signal an error for any
operation that needs a file descriptor, but it shouldn't hang.  Then
the user could kill one of the buffers under auto-revert, or manually
switch to not using notifications, and be able to continue the
session.

Btw, my recommendation is to turn off auto-revert-use-notify in any
session that uses global-auto-revert-mode.  File notifications simply
don't scale up well enough for that, given that Emacs sessions tend to
run for many weeks and have many hundreds of file-visiting buffers.
Also, if you somehow end up visiting a file in /tmp, your Emacs will
get notifications about every temp file operation on the OS, which
will probably slow it down quite a lot.