“All the versions linked above have a bug.”
Point the classic C hello world at /dev/full and the write fails with “No space left on device.” The program swallows the error and exits 0 for success. The K&R version does it. The 1974 original does it. Every tutorial teaches beginners that a failed write is fine, and then the industry wonders where silent data loss comes from.