From owner-freebsd-doc@FreeBSD.ORG Sun Mar 7 20:30:01 2010 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 770F31065673 for ; Sun, 7 Mar 2010 20:30:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 2FDCC8FC0A for ; Sun, 7 Mar 2010 20:30:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o27KU1bm062865 for ; Sun, 7 Mar 2010 20:30:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o27KU1ZV062864; Sun, 7 Mar 2010 20:30:01 GMT (envelope-from gnats) Resent-Date: Sun, 7 Mar 2010 20:30:01 GMT Resent-Message-Id: <201003072030.o27KU1ZV062864@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Matthew Seaman Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B309106564A for ; Sun, 7 Mar 2010 20:23:02 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (gate6.infracaninophile.co.uk [IPv6:2001:8b0:151:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 265B78FC14 for ; Sun, 7 Mar 2010 20:23:01 +0000 (UTC) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) by smtp.infracaninophile.co.uk (8.14.4/8.14.4) with ESMTP id o27KMu89094305 for ; Sun, 7 Mar 2010 20:22:57 GMT (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost) by happy-idiot-talk.infracaninophile.co.uk (8.14.4/8.14.4/Submit) id o27KMuTd094304; Sun, 7 Mar 2010 20:22:56 GMT (envelope-from matthew) Message-Id: <201003072022.o27KMuTd094304@happy-idiot-talk.infracaninophile.co.uk> Date: Sun, 7 Mar 2010 20:22:56 GMT From: Matthew Seaman To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: docs/144534: [patch] fdescfs(5) and devfs(5) both provide /dev/fd/{0, 1, 2} files X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthew Seaman List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2010 20:30:01 -0000 >Number: 144534 >Category: docs >Synopsis: [patch] fdescfs(5) and devfs(5) both provide /dev/fd/{0,1,2} files >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Sun Mar 07 20:30:00 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Matthew Seaman >Release: FreeBSD 8.0-STABLE i386 >Organization: Infracaninophile >Environment: System: FreeBSD happy-idiot-talk.infracaninophile.co.uk 8.0-STABLE FreeBSD 8.0-STABLE #20: Sat Feb 27 16:19:23 GMT 2010 root@happy-idiot-talk.infracaninophile.co.uk:/usr/obj/usr/src/sys/HAPPY-IDIOT-TALK i386 >Description: There is a significant overlap in functionality between fdescfs(5) and devfs(5): both will populate /dev/fd with charcter device files corresponding to the open file descriptors of the process reading the directory. Yet there is no cross reference between the two man pages, nor is there any discussion of an important difference between the two. devfs(5) only provides the character special files corresponding to the standard descriptors 0, 1 and 2; whereas fdescfs(5) provides files for all open descriptors. Refs: http://lists.freebsd.org/pipermail/freebsd-fs/2006-August/002214.html Discussion in ports/144502 >How-To-Repeat: >Fix: --- devfs.5.diff begins here --- --- devfs.5.orig 2010-03-07 19:46:38.000000000 +0000 +++ devfs.5 2010-03-07 20:06:40.000000000 +0000 @@ -69,6 +69,21 @@ .Xr mknod 8 tool can be used to recover deleted device entries under .Nm . +.Pp +The +.Xr fdescfs 5 +filesystem is an alternate means for creating character device files under +.Pa /dev/fd +which correspond to the open file descriptors of the process reading +the directory. +.Nm +only creates files for the standard file descriptors +.Pa 0 , +.Pa 1 +and +.Pa 2 . +.Xr fdescfs 5 +creates files for all open descriptors. .Sh FILES .Bl -tag -width /dev/XXXX -compact .It Pa /dev @@ -85,6 +100,7 @@ .Dl "mount -t devfs devfs /dev" .Sh SEE ALSO .Xr devfs 8 , +.Xr fdescfs 5 , .Xr mount 8 .Sh HISTORY The --- devfs.5.diff ends here --- --- fdescfs.5.diff begins here --- --- fdescfs.5.orig 2010-03-07 19:16:17.000000000 +0000 +++ fdescfs.5 2010-03-07 19:45:28.000000000 +0000 @@ -87,6 +87,15 @@ and .Dv O_RDWR are ignored. +.Pp +NOTE: +.Pa /dev/fd/0 , +.Pa /dev/fd/1 +and +.Pa /dev/fd/2 +files are created by default when devfs alone is mounted. +.Nm +creates entries for all file descriptors opened by the process. .Sh EXAMPLES To mount a .Nm @@ -99,7 +108,8 @@ .It Pa /dev/fd/# .El .Sh SEE ALSO -.Xr mount 8 +.Xr mount 8 , +.Xr devfs 5 .Sh HISTORY The .Nm --- fdescfs.5.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: