An idea probably discarded many times

Guy Harris guy at auspex
Thu Jan 4 17:59:13 AEST 1990


>It doesn't have to work this way.  Nothing needs to work differently until
>the ``ls /proc'' does a read() from the special /proc directory (is it even
>a directory?).

Yes, it is a directory.

>The read() system call could then switch out to code that
>examines the proc table and feeds appropriate bytes back to the caller.

Actually, in S5R4 at least,

	1) "/proc" is a VFS under the S5R4 Virtual File System mechanism
	   (similar to the SunOS 4.x one, but with assorted
	   improvements), so the "read" call doesn't know about it, it
	   just calls the appropriate "read" operator for the "/proc"
	   VFS, just as it would for the S5 file system or the BSD file
	   system or NFS or RFS or.... (i.e., you don't have to teach it
	   specially about "/proc")

	2) "ls" would be using the "getdents()" call, not "read()", and
	   go to the "read directory" VFS operation, not the "read"
	   operation.



More information about the Comp.unix mailing list