From: Paul Eggert <eggert@cs.ucla.edu>
To: 22814@debbugs.gnu.org
Subject: bug#22814: 25.0.91; Emacs runs out of file descriptors on OS X
Date: Fri, 4 Mar 2016 16:32:37 -0800 [thread overview]
Message-ID: <56DA2925.2020009@cs.ucla.edu> (raw)
In-Reply-To: <b265a82c-f47a-71dc-0977-0a2d8dddef03@porkrind.org>
[-- Attachment #1: Type: text/plain, Size: 291 bytes --]
> + if ((errno == EMFILE) || (errno == ENFILE))
> + report_file_error ("Read error on documentation file", file);
This new code should be after the 2nd call to 'emacs_open', not after the 1st.
The difference is unlikely to matter, but still.... I installed the attached
further patch.
[-- Attachment #2: 0001-doc-string-file-descriptor-exhaustion-fix.patch --]
[-- Type: text/x-diff, Size: 1155 bytes --]
From d5e42616a0b5c0b0f0d1b01982d7b949bf8ddc0d Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Fri, 4 Mar 2016 16:29:55 -0800
Subject: [PATCH] doc string file descriptor exhaustion fix
* src/doc.c (get_doc_string): Move newly-added check to a better
location (Bug#22814).
---
src/doc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/doc.c b/src/doc.c
index 6e79065..a20ecbd 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -126,9 +126,6 @@ get_doc_string (Lisp_Object filepos, bool unibyte, bool definition)
fd = emacs_open (name, O_RDONLY, 0);
if (fd < 0)
{
- if ((errno == EMFILE) || (errno == ENFILE))
- report_file_error ("Read error on documentation file", file);
-
#ifndef CANNOT_DUMP
if (!NILP (Vpurify_flag))
{
@@ -141,6 +138,9 @@ get_doc_string (Lisp_Object filepos, bool unibyte, bool definition)
#endif
if (fd < 0)
{
+ if (errno == EMFILE || errno == ENFILE)
+ report_file_error ("Read error on documentation file", file);
+
SAFE_FREE ();
AUTO_STRING (cannot_open, "Cannot open doc string file \"");
AUTO_STRING (quote_nl, "\"\n");
--
2.5.0
prev parent reply other threads:[~2016-03-05 0:32 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-26 6:18 bug#22814: 25.0.91; Emacs runs out of file descriptors on OS X David Caldwell
2016-02-26 8:34 ` Michael Albinus
2016-02-26 9:05 ` David Caldwell
2016-02-26 10:26 ` Nicolas Richard
2016-02-26 9:22 ` Eli Zaretskii
2016-02-26 20:05 ` Michael Albinus
2016-02-26 9:04 ` Eli Zaretskii
2016-02-26 20:51 ` Anders Lindgren
2016-02-27 8:00 ` Michael Albinus
2016-02-27 9:19 ` Eli Zaretskii
2016-02-27 13:26 ` Michael Albinus
2016-02-27 19:00 ` Anders Lindgren
2016-02-27 19:12 ` Michael Albinus
2016-02-27 19:17 ` Eli Zaretskii
2016-02-27 19:33 ` Michael Albinus
2016-02-27 19:39 ` Eli Zaretskii
2016-02-27 19:51 ` Michael Albinus
2016-02-27 19:58 ` Eli Zaretskii
2016-02-27 20:06 ` Michael Albinus
2016-02-27 20:25 ` Eli Zaretskii
2016-02-28 9:57 ` Michael Albinus
2016-02-28 15:51 ` Eli Zaretskii
2016-02-27 19:14 ` Eli Zaretskii
2016-02-27 19:26 ` Michael Albinus
2016-02-27 19:36 ` Eli Zaretskii
2016-02-27 19:39 ` Michael Albinus
2016-02-27 19:56 ` Michael Albinus
2016-02-27 20:06 ` Eli Zaretskii
2016-02-29 10:24 ` Michael Albinus
2016-02-29 16:02 ` Eli Zaretskii
2016-03-02 15:03 ` Michael Albinus
2016-03-02 16:01 ` Eli Zaretskii
2016-03-04 7:53 ` Michael Albinus
2016-03-04 8:14 ` John Wiegley
2016-03-04 8:29 ` Eli Zaretskii
2016-03-04 14:05 ` Michael Albinus
2016-03-04 14:11 ` Michael Albinus
2016-04-10 8:21 ` Michael Albinus
2016-04-10 20:37 ` Anders Lindgren
2016-04-11 6:40 ` Michael Albinus
2016-04-11 6:48 ` Anders Lindgren
2016-04-11 6:58 ` Michael Albinus
2016-04-11 18:59 ` Anders Lindgren
2016-04-12 7:44 ` Michael Albinus
2016-02-27 9:55 ` Anders Lindgren
2016-02-27 10:46 ` Eli Zaretskii
2016-02-27 11:38 ` Anders Lindgren
2016-02-27 12:17 ` Michael Albinus
2016-02-27 12:40 ` Eli Zaretskii
2016-02-27 12:49 ` Michael Albinus
2016-02-27 12:52 ` Eli Zaretskii
2016-02-27 13:00 ` Michael Albinus
2016-03-05 0:32 ` Paul Eggert [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56DA2925.2020009@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=22814@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.