Received: by taz.hyperreal.com (8.6.12/8.6.5) id PAA19189; Mon, 1 Apr 1996 15:55:25 -0800 Received: from sierra.zyzzyva.com by taz.hyperreal.com (8.6.12/8.6.5) with ESMTP id PAA19177; Mon, 1 Apr 1996 15:55:18 -0800 Received: from zyzzyva.com (randy@localhost [127.0.0.1]) by sierra.zyzzyva.com (8.7.4/8.6.11) with ESMTP id RAA22113 for ; Mon, 1 Apr 1996 17:55:12 -0600 (CST) Message-Id: <199604012355.RAA22113@sierra.zyzzyva.com> To: new-httpd@hyperreal.com Subject: Re: SIGPIPE and timeout on Solaris In-reply-to: ben's message of Mon, 01 Apr 1996 18:35:47 +0000. <9604011835.aa09569@gonzo.ben.algroup.co.uk> X-uri: http://www.zyzzyva.com/ Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 01 Apr 1996 17:55:11 -0600 From: Randy Terbush Sender: owner-new-httpd@apache.org Precedence: bulk Reply-To: new-httpd@hyperreal.com Status: O X-Status: > > > > > > 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 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. I'll start looking into this again shortly.