httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manoj Kasichainula <>
Subject Re: cvs commit: apache-2.0/src/os/unix iol_socket.c
Date Thu, 28 Oct 1999 18:41:19 GMT
On Thu, Oct 28, 1999 at 11:09:04AM -0700, Dean Gaudet wrote:
> On 25 Oct 1999 wrote:
> >   We didn't zero out nbytes in one case of error; fix that.
> are you saying that you'd like the api to be able to indicate some number
> of bytes have been transferred in addition to an error?

It might be nice to support it (and I asked about this a few days
ago), but that wasn't the purpose of this. There are ifdefs in buff.c
basically waiting until I either find a good reason to go one way or
the other or until someone speaks up on preference. I'm leaning
towards maintaining Unix semantics, but the other semantics are
actually slightly simpler to code for.

But, the real reason was that it made code simpler in a decent number
of cases to force nbytes = 0 on errors, especially since 0 bytes are
actually written in that case. It makes checking for (error || eof)
simpler and allows deleting a few if statements in buff. Plus I get
warm fuzzies from return values with well defined contents.

> (BUFF is written assuming the unix i/o style...)

It probably assumes it less than it used to, but I wouldn't be
surprised to see breakages on some weird system without that style,
and I'm not going to try to test it until I get a good reason to.

Manoj Kasichainula - manojk at io dot com -

View raw message