Subject: Re: fdesc file system?
To: Malcolm Herbert <netbsd-users@NetBSD.org, mjch@mjch.net>
From: Hubert Feyrer <hubertf@gmx.de>
List: netbsd-users
Date: 11/23/2005 11:04:44
In article <20051123000650.GB8049@sci.monash.edu.au> you wrote:
> I'm curious about the fdesc filesystem, which creates files in /dev/fd
> as well as symlinks for /dev/std{in,out,err}. I have a 2.0.2 system
> which appears to have /dev/std* and a populated /dev/fd yet I don't
> think I've ever tried to mount the fdesc filesystem over /dev
>
> MAKEDEV seems to create these entries if fdesc isn't mounted ... given
> that that's the case, why would we need the filesystem type? What does
> it provide that character-special files in a simple directory structure
> doesn't?
I guess a realistic reflection of a process' (open) file descriptors:
noon% ls /dev/fd/
0 11 14 17 2 22 25 28 30 33 36 39 41 44 47 5 52 55 58 60 63 9
1 12 15 18 20 23 26 29 31 34 37 4 42 45 48 50 53 56 59 61 7
10 13 16 19 21 24 27 3 32 35 38 40 43 46 49 51 54 57 6 62 8
I doubt that ls has 64 open file descriptors.
- Hubert