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 23:55:11 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.
> What is "it" in this case? Assuming it is write() then we would expect a -1
> for failure. A zero return should only be possible if you either write 0 bytes
> or have O_NDELAY/O_NONBLOCK set.

"it" is write() coupled with our timeout() code.

Not sure yet if this applies, but from the Solaris manpage for write()

     When writing to a stream, data messages are created  with  a
     priority band of zero.  When writing to a stream that is not
     a pipe or FIFO:

          o  If O_NDELAY and O_NONBLOCK  are  not  set,  and  the
            stream  cannot accept data (the stream write queue is
            full  due  to  internal  flow  control   conditions),
            write() blocks until data can be accepted.

          o  If O_NDELAY or O_NONBLOCK is set and the stream can-
            not accept data, write() returns -1 and sets errno to

          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.

I'll start looking into this again shortly.

View raw message