about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2008-12-04T13·13+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2008-12-04T13·13+0000
commit9ccdb80de32cf8ff4e0f84c7011b5fbbfaf73c01 (patch)
tree7404fc62d35e8c829ad4e6343f4e96b78f13c74e
parent9fd9c4c63559e21dde62b719a1665f9bc6c2155e (diff)
* 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).

-rw-r--r--src/libutil/util.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index e541887ee0d4..02dd53a17991 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);
 }