httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <>
Subject Re: socket_read?
Date Mon, 19 Feb 2001 06:43:11 GMT
On Mon, Feb 19, 2001 at 12:18:27AM -0500, Cliff Woolley wrote:
> ---Greg Stein said:
> > If you read with APR_NONBLOCK_READ, then you may get back zero-length
> > buckets. People who use this reading style should be *VERY* careful: you
> > don't want to loop with NONBLOCK because you could sit there and read
> > zero-length buckets for a long time.
> Precisely.  One thing I've been wondering about though... how does the pipe
> bucket get reinserted as the next bucket if in APR_NONBLOCK_READ mode with 0
> bytes returned?  Does it work right in that case?

Standard operation during read is to convert "self" into a heap bucket with
data that has been read, then to insert a new bucket *after* "self".

How are things different if the converted-self has a length of zero bytes?


p.s. and your idea of using IMMORTAL for a zero-length bucket is great!

Greg Stein,

View raw message