From 9ccdb80de32cf8ff4e0f84c7011b5fbbfaf73c01 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 4 Dec 2008 13:13:31 +0000 Subject: [PATCH] * Don't ignore errors from writing to stderr. That way, when nix-store -r (or some other operation) is started via ssh, it will at least have a chance of terminating quickly when the connection is killed. Right now it just runs to completion, because it never notices that stderr is no longer connected to anything. Of course it would be better if sshd would just send a SIGHUP, but it doesn't (https://bugzilla.mindrot.org/show_bug.cgi?id=396). --- src/libutil/util.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/libutil/util.cc b/src/libutil/util.cc index e541887ee0..02dd53a179 100644 --- a/src/libutil/util.cc +++ b/src/libutil/util.cc @@ -469,11 +469,7 @@ void warnOnce(bool & haveWarned, const format & f) static void defaultWriteToStderr(const unsigned char * buf, size_t count) { - try { - writeFull(STDERR_FILENO, buf, count); - } catch (SysError & e) { - /* ignore EPIPE etc. */ - } + writeFull(STDERR_FILENO, buf, count); }