From owner-freebsd-current Wed Aug 7 7:20:59 2002 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 A180837B400; Wed, 7 Aug 2002 07:20:55 -0700 (PDT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9C42943E84; Wed, 7 Aug 2002 07:20:54 -0700 (PDT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.12.4/8.12.4) with SMTP id g77EKeOo009833; Wed, 7 Aug 2002 10:20:40 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Wed, 7 Aug 2002 10:20:39 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Chris Costello Cc: Christian Weisgerber , freebsd-current@FreeBSD.org Subject: Re: devfs, fdescfs: /dev/fd problems In-Reply-To: <20020806185240.GA3138@holly.calldei.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 6 Aug 2002, Chris Costello wrote: > > The descriptor used by readdir() is there, but the pipe on 63 is > > still missing, although open()ing it obviously works. > > I can't explain why there's even a pipe open on fd #63, but the > reason you're only going to see 0, 1 and 2 is because that's just how > devfs's implementation of /dev/fd works. The last time we (phk and I) > looked at duplicating the fdescfs code in devfs it was obvious it would > require ugly hacks to get it to work, so it was decided that devfs would > only provide support for /dev/fd/[0-2] so we can have > /dev/std{in,out,err} as symlinks to them. fdescfs (should) just export > the calling process's file table as a set of vnodes. Many things found attached to the file table are not vnodes, making the notion of a vnode from them a little odd. In particular, pipes are not vnodes, and sockets are not vnodes. :-) Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Network Associates Laboratories To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message