diff options
author | Nathan Straz <nstraz@redhat.com> | 2013-09-17 18:01:20 -0400 |
---|---|---|
committer | Nathan Straz <nstraz@redhat.com> | 2013-09-17 18:01:20 -0400 |
commit | fbaa0680a0e7207d2274fed1b196e1c94f21c1c1 (patch) | |
tree | 73c58b21620b22aa62b206af2d417de3b8a199cf | |
parent | 79976cb5d469b04420b77079918569a0ac504dd7 (diff) | |
download | qarsh-fbaa0680a0e7207d2274fed1b196e1c94f21c1c1.tar.gz qarsh-fbaa0680a0e7207d2274fed1b196e1c94f21c1c1.tar.xz qarsh-fbaa0680a0e7207d2274fed1b196e1c94f21c1c1.zip |
Say something if we can't write to stdout
-rw-r--r-- | qarsh.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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; |