aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/lib.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/lib.c b/lib/lib.c
index 14cedb60..c4d871c2 100644
--- a/lib/lib.c
+++ b/lib/lib.c
@@ -55,11 +55,14 @@ void error_exit(char *msg, ...)
// Die with an error message and strerror(errno)
void perror_exit(char *msg, ...)
{
- va_list va;
+ // Die silently if our pipeline exited.
+ if (errno != EPIPE) {
+ va_list va;
- va_start(va, msg);
- verror_msg(msg, errno, va);
- va_end(va);
+ va_start(va, msg);
+ verror_msg(msg, errno, va);
+ va_end(va);
+ }
xexit();
}