From owner-freebsd-arch Fri Dec 20 20:27:41 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 56BC837B401; Fri, 20 Dec 2002 20:27:40 -0800 (PST) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1E4B143EDA; Fri, 20 Dec 2002 20:27:40 -0800 (PST) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id E452AAE2B7; Fri, 20 Dec 2002 20:27:34 -0800 (PST) Date: Fri, 20 Dec 2002 20:27:34 -0800 From: Alfred Perlstein To: arch@freebsd.org Cc: bde@freebsd.org Subject: Re: pipes and FIONBIO breakage? Message-ID: <20021221042734.GL23663@elvis.mu.org> References: <20021221023707.GK23663@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021221023707.GK23663@elvis.mu.org> User-Agent: Mutt/1.4i 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 Perlstein [021220 18:37] wrote: > I noticed that the ioctl handler for pipes doesn't do anything for > FIONBIO requests, this is in contrast to the socket handling of > FIONBIO requests which sets the SS_NBIO flag in the socket structure. Well the road to hell... It actually appears that this is a non-issue for pipe versus sockets. This is because dup does a shallow copy of struct file. This _would_ have been a problem for fifo's, however that code seems to duplicate the pipe code somewhat. There does appear to be an issue where the fifo code temporarity ORs in the non-block state of the struct file into the socket behind it when performing reads and writes. This might cause someone else to block when multiple people open a fifo because of races. I'll wait for the caffeine levels to drop a bit before getting too worried about it though. -- -Alfred Perlstein [alfred@freebsd.org] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message