Path: utzoo!utgpu!watserv1!watmath!att!att!emory!samsung!cs.utexas.edu!jsq From: arnold%audiofax.com@mathcs.emory.edu (Arnold Robbins) Newsgroups: comp.std.unix Subject: File system name space (was Re: Standards Update, IEEE 1003.4: Real-time Extensions) Message-ID: <13878@cs.utexas.edu> Date: 21 Oct 90 20:35:33 GMT References: <13132@cs.utexas.edu> <13219@cs.utexas.edu> <13689@cs.utexas.edu> <13775@cs.utexas.edu> Sender: jsq@cs.utexas.edu Reply-To: arnold@audiofax.com Organization: AudioFAX Inc., Atlanta Lines: 31 Approved: jsq@cs.utexas.edu (Moderator, John S. Quarterman) X-Submissions: std-unix@uunet.uu.net Submitted-by: arnold%audiofax.com@mathcs.emory.edu (Arnold Robbins) (It's about time the subject line on this one got changed, don't you think?) [Seems plausible to me. -mod] Anyway, since we're discussing what is and isn't in the POSIX name space, I'd like to put in a plug for the /dev/fd directory. Opening /dev/fd/7 is equivalent to doing a dup(7); it is a generalization of the "treat '-' as stdin" hack used by cat and awk (and others) and allows at least two shells (ksh and rc [see your nearest V10 manual]) to do interesting things like set up non-linear pipelines. (At least I think rc does it. I know ksh does.) There's lot of existing practice on this one; it originated in V8, circa 1984 or earlier, and PD versions for various, more popular, Unix incarnations have been around for some time as well. (In fact, in V8 - V10, /dev/stdin, /dev/stdout, /dev/stderr, and /dev/tty are links to /dev/fd/0, /dev/fd/1, /dev/fd/2, and /dev/fd/3, respectively. The last, in particular, is a nice generalization, and eliminates an ugly special case in the kernel; init just does one more dup.) It's going to be fun watching how /dev/fd will be presented as both for and against the case for "fd-centric" Unix... :-) Personally, I'm in the put-it- in-the-filesystem camp. -- Arnold Robbins AudioFAX, Inc. | Laundry increases 2000 Powers Ferry Road, #200 / Marietta, GA. 30067 | exponentially in the INTERNET: arnold@audiofax.com Phone: +1 404 933 7612 | number of children. UUCP: emory!audfax!arnold Fax-box: +1 404 618 4581 | -- Miriam Robbins Volume-Number: Volume 21, Number 209