Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 966D9431FBF for ; Tue, 17 Nov 2009 07:28:42 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id T6gZjMwgV4Pb for ; Tue, 17 Nov 2009 07:28:41 -0800 (PST) Received: from dottedmag.net (burger.dottedmag.net [212.75.37.82]) by olra.theworths.org (Postfix) with ESMTP id AF4F7431FBC for ; Tue, 17 Nov 2009 07:28:41 -0800 (PST) Received: from vertex.dottedmag (unknown [91.197.127.125]) by dottedmag.net (Postfix) with ESMTPSA id 44E938C57C for ; Tue, 17 Nov 2009 16:28:40 +0100 (CET) Received: from dottedmag by vertex.dottedmag with local (Exim 4.69) (envelope-from ) id 1NAPyw-0001lu-7S for notmuch@notmuchmail.org; Tue, 17 Nov 2009 21:28:38 +0600 From: Mikhail Gusarov To: notmuch@notmuchmail.org Date: Tue, 17 Nov 2009 21:28:37 +0600 Message-Id: <1258471718-6781-1-git-send-email-dottedmag@dottedmag.net> X-Mailer: git-send-email 1.6.3.3 Subject: [notmuch] [PATCH 1/2] Close message file after parsing message headers X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Nov 2009 15:28:42 -0000 Keeping unused files open helps to see "Too many open files" often. Signed-off-by: Mikhail Gusarov --- 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