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 C3655429E28 for ; Sat, 5 Nov 2011 22:34:47 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled 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 NvsYV8y2voVh for ; Sat, 5 Nov 2011 22:34:47 -0700 (PDT) Received: from plum.liegesta.at (plum.liegesta.at [83.169.17.237]) by olra.theworths.org (Postfix) with ESMTP id DF6B2431FB6 for ; Sat, 5 Nov 2011 22:34:46 -0700 (PDT) Received: from ambiguous-mid.liegesta.at (mk046207255003.a1.net [46.207.255.3]) (Authenticated sender: davrieb) by plum.liegesta.at (Postfix) with ESMTPA id 7A2F127B8255; Sun, 6 Nov 2011 06:34:45 +0100 (CET) Received: by ambiguous-mid.liegesta.at (Postfix, from userid 1000) id 8AACE20707; Sun, 6 Nov 2011 06:34:43 +0100 (CET) From: David Riebenbauer To: Notmuch Mailing List Subject: [PATCH 2/2] notmuch-deliver: in save_splice() log failures as debug. Date: Sun, 6 Nov 2011 06:34:28 +0100 Message-Id: <1320557668-2314-2-git-send-email-davrieb@liegesta.at> X-Mailer: git-send-email 1.7.7.1 In-Reply-To: <1320557668-2314-1-git-send-email-davrieb@liegesta.at> References: <1320557668-2314-1-git-send-email-davrieb@liegesta.at> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 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: Sun, 06 Nov 2011 05:34:48 -0000 If we don't exit if splice fails then we should just log failures as debug instead of critical. --- contrib/notmuch-deliver/src/main.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/notmuch-deliver/src/main.c b/contrib/notmuch-deliver/src/main.c index 8423d91..39cd804 100644 --- a/contrib/notmuch-deliver/src/main.c +++ b/contrib/notmuch-deliver/src/main.c @@ -148,7 +148,7 @@ save_splice(int fdin, int fdout) int ret, written, pfd[2]; if (pipe(pfd) < 0) { - g_critical("Failed to create pipe: %s", g_strerror(errno)); + g_debug("Failed to create pipe: %s", g_strerror(errno)); return EX_IOERR; } @@ -157,7 +157,7 @@ save_splice(int fdin, int fdout) if (!ret) break; if (ret < 0) { - g_critical("Splicing data from standard input failed: %s", + g_debug("Splicing data from standard input failed: %s", g_strerror(errno)); close(pfd[0]); close(pfd[1]); @@ -167,13 +167,13 @@ save_splice(int fdin, int fdout) do { written = splice(pfd[0], NULL, fdout, NULL, ret, 0); if (!written) { - g_critical("Splicing data to temporary file failed: internal error"); + g_debug("Splicing data to temporary file failed: internal error"); close(pfd[0]); close(pfd[1]); return EX_IOERR; } if (written < 0) { - g_critical("Splicing data to temporary file failed: %s", + g_debug("Splicing data to temporary file failed: %s", g_strerror(errno)); close(pfd[0]); close(pfd[1]); -- 1.7.7.1