Use ferror to check for error conditions in pipe.

This commit is contained in:
Richard Jones
2009-04-26 09:51:48 +01:00
parent 38f9222d21
commit a30f66436e

View File

@@ -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);