From a30f66436eac79b9e532e448882d03375c0d5e78 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Sun, 26 Apr 2009 09:51:48 +0100 Subject: [PATCH] Use ferror to check for error conditions in pipe. --- daemon/tar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/tar.c b/daemon/tar.c index ecf919d..a33ec3a 100644 --- a/daemon/tar.c +++ b/daemon/tar.c @@ -139,7 +139,7 @@ do_tar_out (const char *dir) } } - if (r == -1) { + if (ferror (fp)) { perror (dir); send_file_end (1); /* Cancel. */ pclose (fp); @@ -261,7 +261,7 @@ do_tgz_out (const char *dir) } } - if (r == -1) { + if (ferror (fp)) { perror (dir); send_file_end (1); /* Cancel. */ pclose (fp); -- 1.8.3.1