From owner-freebsd-arch Thu Oct 25 16:43:28 2001 Delivered-To: freebsd-arch@freebsd.org Received: from mail-green.research.att.com (H-135-207-30-103.research.att.com [135.207.30.103]) by hub.freebsd.org (Postfix) with ESMTP id DB36A37B406; Thu, 25 Oct 2001 16:43:25 -0700 (PDT) Received: from alliance.research.att.com (alliance.research.att.com [135.207.26.26]) by mail-green.research.att.com (Postfix) with ESMTP id 22BD01E00D; Thu, 25 Oct 2001 19:43:20 -0400 (EDT) Received: from windsor.research.att.com (windsor.research.att.com [135.207.26.46]) by alliance.research.att.com (8.8.7/8.8.7) with ESMTP id TAA06028; Thu, 25 Oct 2001 19:43:19 -0400 (EDT) From: Bill Fenner Received: (from fenner@localhost) by windsor.research.att.com (8.8.8+Sun/8.8.5) id QAA28072; Thu, 25 Oct 2001 16:43:18 -0700 (PDT) Message-Id: <200110252343.QAA28072@windsor.research.att.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII To: rwatson@freebsd.org Subject: Re: Behavior of select() on pipes Cc: bright@mu.org, arch@freebsd.org Date: Thu, 25 Oct 2001 16:43:18 -0700 Versions: dmail (solaris) 2.2j/makemail 2.9b Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG IEEE Std 1003.1-200x says, about select: A descriptor shall be considered ready for reading when a call to an input function with O_NONBLOCK clear would not block, whether or not the function would transfer data successfully. and about read: When attempting to read from an empty pipe or FIFO: * If no process has the pipe open for writing, read( ) shall return 0 to indicate end-of-file. This combination says to me that select() should consider a FIFO with no writers to be readable. This makes sense when it's been open and the writer closes it, as you need to read the EOF, but doesn't make as much sense when it hasn't been opened for write yet. Perhaps we can carefully interpret "an empty .. FIFO" to exclude the time before the first writer opens it. Maybe during that time it's not empty, it's untenanted. Bill To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message