httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Terbush <>
Subject Re: SIGPIPE and timeout on Solaris
Date Mon, 01 Apr 1996 18:16:39 GMT

I could be missreading the code, just now trying to get familiar
with it. It looks as if we assume that it will return a -1 if it
fails. Never looking for EPIPE.

I've got it to at least time out by adding an abort_connection()
call toward the end of timeout() if timeout_req. I need to 
study this more later. The bwrite() loops in http_protocol.c if
conn->abort is not set.


> > I think the write stuff has changed significantly with the addition
> > of the buffered write code. One thing that seems to be a possible
> > difference on Solaris is that write() will return a number greater
> > than 0 on a blocked socket. This might be causing the problem.
> > I've tried several approaches to getting this to exit the write
> > loops with no success. I'll come back to it later.
> It returns the number of bytes written, even if it is blocked and
> can write part of the msg, see second point. But that makes sense.
>           o  If O_NDELAY or O_NONBLOCK is set and the stream can-
>             not accept data, write() returns -1 and sets errno to
>             EAGAIN.
>           o  If O_NDELAY or O_NONBLOCK is set  and  part  of  the
>             buffer  has  already  been  written  when a condition
>             occurs in which the stream cannot  accept  additional
>             data,  write()  terminates  and returns the number of
>             bytes written.
> Dw.

View raw message