aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/logging.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-09-16 18:52:42 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-09-16 18:52:42 +0200
commit054be5025762c5e1c7e853c4fa5d7eed8da1727f (patch)
treec5bf9e3b3125bbffd8e05538ac39c5bd383badb7 /src/libutil/logging.cc
parent2e1493037b06eb97bf9e07693a974afadbf94386 (diff)
printMsg(): Don't check for interrupts
Having the logger function potentially throw exceptions is Heisenbuggy.
Diffstat (limited to 'src/libutil/logging.cc')
-rw-r--r--src/libutil/logging.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/libutil/logging.cc b/src/libutil/logging.cc
index 15bb1e175..0229ba472 100644
--- a/src/libutil/logging.cc
+++ b/src/libutil/logging.cc
@@ -60,14 +60,12 @@ void warnOnce(bool & haveWarned, const FormatOrString & fs)
void writeToStderr(const string & s)
{
try {
- writeFull(STDERR_FILENO, s);
+ writeFull(STDERR_FILENO, s, false);
} catch (SysError & e) {
- /* Ignore failing writes to stderr if we're in an exception
- handler, otherwise throw an exception. We need to ignore
- write errors in exception handlers to ensure that cleanup
- code runs to completion if the other side of stderr has
- been closed unexpectedly. */
- if (!std::uncaught_exception()) throw;
+ /* Ignore failing writes to stderr. We need to ignore write
+ errors to ensure that cleanup code that logs to stderr runs
+ to completion if the other side of stderr has been closed
+ unexpectedly. */
}
}