From owner-freebsd-arch Thu Oct 25 12:56:23 2001 Delivered-To: freebsd-arch@freebsd.org Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by hub.freebsd.org (Postfix) with ESMTP id 665F537B406 for ; Thu, 25 Oct 2001 12:56:20 -0700 (PDT) Received: from fledge.watson.org (robert@fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.11.6/8.11.5) with SMTP id f9PJuFB73998 for ; Thu, 25 Oct 2001 15:56:15 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Thu, 25 Oct 2001 15:56:14 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: arch@FreeBSD.org Subject: Behavior of select() on pipes Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Alfred recently pointed me at some FreeBSD pipe behavior that I was previously unaware of: select() will always return true regarding the readability of a fifo, regardless of whether data is pending on the fifo. He referred to this as "brokenness", which is a diagnosis I tend to accept. However, it turns out to be somewhat more complicated than I thought, witnessed by the extensive discussion on freebsd-bugs, and logged in PR/19871. But to the short of it: it sounds to me like we should modify the behavior of select() to match the more popular (but possibly standards-incompliant) behavior, which allows select to block on the fifo until data is ready (found in Solaris, Linux, et al). Rather than just commit the patch, I thought I'd open myself up for broad flamage. Comments on what to do are welcome. Robert N M Watson FreeBSD Core Team, TrustedBSD Project robert@fledge.watson.org NAI Labs, Safeport Network Services To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message