From: David Riebenbauer <davrieb@liegesta.at>
To: Notmuch Mailing List <notmuch@notmuchmail.org>
Subject: [PATCH 2/2] notmuch-deliver: in save_splice() log failures as debug.
Date: Sun, 6 Nov 2011 06:34:28 +0100 [thread overview]
Message-ID: <1320557668-2314-2-git-send-email-davrieb@liegesta.at> (raw)
In-Reply-To: <1320557668-2314-1-git-send-email-davrieb@liegesta.at>
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
next prev parent reply other threads:[~2011-11-06 5:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-06 5:34 [PATCH 1/2] notmuch-deliver: Retry with readwrite if splice() fails David Riebenbauer
2011-11-06 5:34 ` David Riebenbauer [this message]
2011-11-06 8:01 ` Ali Polatel
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
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1320557668-2314-2-git-send-email-davrieb@liegesta.at \
--to=davrieb@liegesta.at \
--cc=notmuch@notmuchmail.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 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).