From e69d2fc6981b48fc46a7e9ae00962d309d5dabe4 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 19 May 2019 02:35:28 -0500 Subject: Don't complain about short writes to stdout. --- lib/xwrap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/xwrap.c b/lib/xwrap.c index e4f8f013..817037db 100644 --- a/lib/xwrap.c +++ b/lib/xwrap.c @@ -832,8 +832,10 @@ long long xsendfile_len(int in, int out, long long bytes) { long long len = sendfile_len(in, out, bytes, 0); - if (bytes != -1 && bytes != len) + if (bytes != -1 && bytes != len) { + if (out == 1 && len<0) xexit(); error_exit("short %s", (len<0) ? "write" : "read"); + } return len; } -- cgit v1.2.3