On Sat, Jul 12, 2003 at 12:23:26PM -0700, Remco Treffkorn wrote: > > no your patch is broken. on error it returns number of items written, > > NOT number of short items as the documentation states: > > > > If an error occurs, or the end-of-file is reached, the return value is > > a short item count (or zero). > > ^^^^^^^^^^^^^^^^^^ > > Here comes that language thing again. When I read the man page, I interpret > this as 'a number short of the requested number', which is consistent with > 'returns the number of items written'. Why we would turn around and make this > 'the number of items yet to be written' is beyond me. i interpret it as the latter, but your right this is vague and subject to interpretation, either we need to find another place this is documented (C standards) or else test glibc or some other established implementation to see what it does. > The wording in the linux man page is poor. I checked diet libc (source code), > and it chooses to implement the return of zero in the error case. So, no help the man page says zero is an acceptable return value. -- Ethan Benson http://www.alaska.net/~erbenson/
Attachment:
pgp00026.pgp
Description: PGP signature