Subject: Bug#818: echo builtin doesn't check for write errors

From: "Buddha M. D. Buck" <[email-masked]>
Date: Sat, 17 Aug 1996 00:42:35 -0400

As of 1.14.6-4, this bug is still there... maybe

$ type echo
echo is a shell builtin
$ echo foo >/dev/full
$ echo $?
0
$ cat /dev/zero >/dev/full
cat: write error: No space left on device
$ echo $?
1
$ /bin/echo foo >/dev/full
$ echo $?
0
$ file /bin/echo    
/bin/echo: ELF 32-bit LSB executable, Intel 80386, version 1, stripped
$ 

The built-in version of echo is faithfull reproducing what the
binary version does.  

If they are both in error, should another bug be filed for
shellutils?  The manpage for echo makes no mention whatsoever
of return values.
-- 
     Buddha Buck                      [email-masked]
"Just as the strength of the Internet is chaos, so the strength of our
liberty depends upon the chaos and cacaphony of the unfettered speech
the First Amendment protects."  -- A.L.A. v. U.S. Dept. of Justice

---

From: Ian Jackson <[email-masked]>
Date: Sat, 24 Aug 96 18:28 BST

> shellutils?  The manpage for echo makes no mention whatsoever

There are already bug reports against shellutils and tcsh too.

All programs should check for write errors.  The fact that the
documentation neglects to say that it does doesn't mean it is OK for
it not to bother.

Ian.