From fbaa0680a0e7207d2274fed1b196e1c94f21c1c1 Mon Sep 17 00:00:00 2001 From: Nathan Straz Date: Tue, 17 Sep 2013 18:01:20 -0400 Subject: Say something if we can't write to stdout --- qarsh.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qarsh.c b/qarsh.c index 50bde2a..61c73e2 100644 --- a/qarsh.c +++ b/qarsh.c @@ -288,6 +288,8 @@ run_remote_cmd(char *cmdline) if (nbytes == z_out) { z_out = 0; if (eof_out) close(fileno(stdout)); + } else if (nbytes == -1) { + fprintf(stderr, "Error writing to stdout: %s\n", strerror(errno)); } else { memmove(b_out, b_out+nbytes, z_out - nbytes); z_out -= nbytes; -- cgit