unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 1/2] Close message file after parsing message headers
@ 2009-11-17 15:28 Mikhail Gusarov
  2009-11-17 15:28 ` [PATCH 2/2] Include <stdint.h> to get uint32_t in C++ file with gcc 4.4 Mikhail Gusarov
  2009-11-17 17:13 ` [PATCH 1/2] Close message file after parsing message headers Carl Worth
  0 siblings, 2 replies; 5+ messages in thread
From: Mikhail Gusarov @ 2009-11-17 15:28 UTC (permalink / raw)
  To: notmuch

Keeping unused files open helps to see "Too many open files" often.

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
---
 lib/message-file.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/lib/message-file.c b/lib/message-file.c
index 8a3f8ee..197ab01 100644
--- a/lib/message-file.c
+++ b/lib/message-file.c
@@ -325,6 +325,11 @@ notmuch_message_file_get_header (notmuch_message_file_t *message,
 	    return decoded_value;
     }
 
+    if (message->parsing_finished) {
+        fclose (message->file);
+        message->file = NULL;
+    }
+
     if (message->line)
 	free (message->line);
     message->line = NULL;
-- 
1.6.3.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-11-18  9:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-17 15:28 [PATCH 1/2] Close message file after parsing message headers Mikhail Gusarov
2009-11-17 15:28 ` [PATCH 2/2] Include <stdint.h> to get uint32_t in C++ file with gcc 4.4 Mikhail Gusarov
2009-11-17 17:13 ` [PATCH 1/2] Close message file after parsing message headers Carl Worth
2009-11-17 21:15   ` Keith Packard
2009-11-18  9:42     ` Carl Worth

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).