From: Tony Finch Date: Tue, 7 Jun 2011 15:48:44 +0000 (+0100) Subject: Ensure we log the error message when unlink() fails. X-Git-Tag: list_safety_merge_proposal~25 X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/0ca0cf52fa9c635984937a3cc813d38fcdacd7ab?hp=ab42bd23609158bd5c00e3e4bd02535a3d9af5af Ensure we log the error message when unlink() fails. See also commit ID 0761d44e --- diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index dc8e0437d..8ca5d85af 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -14,6 +14,10 @@ TF/01 HP/UX build fix: avoid arithmetic on a void pointer. TK/01 DKIM Verification: Fix relaxed canon for empty headers w/o whitespace trailer +TF/02 Fix a couple more cases where we did not log the error message + when unlink() failed. See also change 4.74-TF/03. + + Exim version 4.76 ----------------- diff --git a/src/src/deliver.c b/src/src/deliver.c index 41e4a66f3..6cb34857f 100644 --- a/src/src/deliver.c +++ b/src/src/deliver.c @@ -6575,10 +6575,12 @@ if (addr_defer == NULL) sprintf(CS spoolname, "%s/input/%s/%s-D", spool_directory, message_subdir, id); if (Uunlink(spoolname) < 0) - log_write(0, LOG_MAIN|LOG_PANIC_DIE, "failed to unlink %s", spoolname); + log_write(0, LOG_MAIN|LOG_PANIC_DIE, "failed to unlink %s: %s", + spoolname, strerror(errno)); sprintf(CS spoolname, "%s/input/%s/%s-H", spool_directory, message_subdir, id); if (Uunlink(spoolname) < 0) - log_write(0, LOG_MAIN|LOG_PANIC_DIE, "failed to unlink %s", spoolname); + log_write(0, LOG_MAIN|LOG_PANIC_DIE, "failed to unlink %s: %s", + spoolname, strerror(errno)); /* Log the end of this message, with queue time if requested. */