[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#821: Patch for /bin/echo: check write error



[ Please don't Cc: me when replying to my message on a mailing list. ]

This bug is now over 19 months old. It would be nice to get it
fixed. Patch enclosed.

-- 
Please read <http://www.iki.fi/liw/mail-to-lasu.html> before mailing me.
Please don't Cc: me when replying to my message on a mailing list.

--- echo-original.c	Fri Nov  8 03:59:46 1996
+++ echo-check-write-error.c	Fri Nov  8 03:59:10 1996
@@ -225,5 +225,9 @@
     }
   if (display_return)
     putchar ('\n');
+    
+  if (ferror (stdout) || fflush (stdout) == EOF)
+    error (1, errno, "error writing to the standard output");
+    
   exit (0);
 }

Attachment: pgpD5S262jiAq.pgp
Description: PGP signature


Reply to: