From owner-freebsd-net Wed Mar 19 3:44:46 2003 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DA4C137B404 for ; Wed, 19 Mar 2003 03:44:45 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8A19543F85 for ; Wed, 19 Mar 2003 03:44:44 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id WAA27219; Wed, 19 Mar 2003 22:44:35 +1100 Date: Wed, 19 Mar 2003 22:44:34 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Peter Pentchev Cc: Luigi Rizzo , "" , Tristan Goode Subject: Re: write(2) SIGPIPE on a closed socket? In-Reply-To: <20030319095842.GC27330@straylight.oblivion.bg> Message-ID: <20030319223311.U8508@gamplex.bde.org> References: <20030319093002.GT468@straylight.oblivion.bg> <20030319013748.A84035@xorpc.icir.org> <20030319094506.GB27330@straylight.oblivion.bg> <20030319095842.GC27330@straylight.oblivion.bg> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Wed, 19 Mar 2003, Peter Pentchev wrote: > Actually, I wonder if I have answered my own question. dnscache seems > to use poll(2), and it would be poll(2)'s task to notify the program of > any exceptional (error) conditions. I wonder if it is possible that > dnscache does not handle POLLERR properly... Let me check. Everything in poll() except flags for non-exceptional i/o is defective in FreeBSD. E.g., POLLERR is not ever referenced in `find /sys/ -name *.c`, and POLLHUP is only supported for keyboards, ptys, very dead ttys (ones with no tty struct but not hung up ones), ordinary pipes and revoked fd's. write(2) may still fail after poll(2) finds something to write on because anything may go away after it is found. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message