jfb2 writes in Bug 119:
[oweals/busybox.git] / coreutils / cat.c
index 86527576728f23f837ad2a316fa47f5311bbcb87..62af6c5d54495c384df9f6f2fb65fc393f4698b9 100644 (file)
@@ -54,7 +54,7 @@ extern int cat_main(int argc, char **argv)
 
        do {
                if ((f = bb_wfopen_input(*argv)) != NULL) {
-                       int r = bb_copyfd(fileno(f), STDOUT_FILENO, 0);
+                       int r = bb_copyfd_eof(fileno(f), STDOUT_FILENO);
                        bb_fclose_nonstdin(f);
                        if (r >= 0) {
                                continue;