From owner-freebsd-current@FreeBSD.ORG Wed Jun 4 06:43:52 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B0B6337B401 for ; Wed, 4 Jun 2003 06:43:52 -0700 (PDT) Received: from gold.he.net (gold.he.net [216.218.149.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 314AE43F85 for ; Wed, 4 Jun 2003 06:43:52 -0700 (PDT) (envelope-from daver@gomerbud.com) Received: from tombstone.localnet.gomerbud.com (adsl-64-166-167-150.dsl.snlo01.pacbell.net [64.166.167.150]) by gold.he.net (8.8.6p2003-03-31/8.8.2) with ESMTP id GAA31462; Wed, 4 Jun 2003 06:43:50 -0700 Received: by tombstone.localnet.gomerbud.com (Postfix, from userid 1001) id BDE0A3CA; Wed, 4 Jun 2003 06:43:56 -0700 (PDT) Date: Wed, 4 Jun 2003 06:43:56 -0700 From: "David P. Reese Jr." To: Marc Olzheim Message-ID: <20030604134356.GA13608@tombstone.localnet.gomerbud.com> References: <20030604133019.GA50874@stack.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030604133019.GA50874@stack.nl> User-Agent: Mutt/1.4i Sender: cc: current@freebsd.org Subject: Re: devfs and /dev/fd/3 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2003 13:43:53 -0000 On Wed, Jun 04, 2003 at 03:30:19PM +0200, Marc Olzheim wrote: > Hi. > > I've seen the question once before, but it was not answered (on-list ?), > so now that I run in on it, I'd like to know what to do: > > On FreeBSD 4.x, without devfs, the following worked: > ( echo foo | tee /dev/fd/3 | tr f F ) 3>&1 > > It should produce both "foo" and "Foo" > > FreeBSD 5 with devfs, however, does not create a /dev/fd/3 upon opening > filedescriptor 3 by the shell, so there's no device to write to... > > How can I fix or circumvent this, aside from mounting a ufs partition > with mknod-ed files over /dev/fd ? You want fdescfs(5). -- David P. Reese Jr. daver@gomerbud.com -------------------------------------------------------------------------- It can be argued that returning a NULL pointer when asked to allocate zero bytes is a silly response to a silly question. -- FreeBSD manual page for malloc(3)