🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.unix
Article #623

Re: File system name space (was Re: Standards Update, IEEE 1003.4: Real-time Extensions)

#623
From: Craig Presson
Date: Wed, 24 Oct 1990 19:11
55 lines
3335 bytes
Submitted-by: craig@b11.ingr.com (Craig Presson)

In article <13878@cs.utexas.edu>, arnold%audiofax.com@mathcs.emory.edu
(Arnold Robbins) writes:
|> Submitted-by: arnold%audiofax.com@mathcs.emory.edu (Arnold Robbins)
|> 
|> 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

Ah, roger, that's a big "ditto" on the virtues of One Big Namespace for
all Permanent Objects. Use subspaces to separate classes (he said 
tautologically) *.

But for those of us without access to every Unix manual ever published
(I do have a Version 7 Volume 1), could you fill in a bit more on the
semantics of this hybrid /dev entry? Like what do you get when you open
"/dev/fd/7" and there is no open file using that slot? Does the system
make these entries "invisible" to processes not using them? Do you just
get a classic "It's an error from Unix, you're not supposed to understand"
type return? Or am I Missing Something?


--  ******************************************************
    ** Craig Presson              pressonc@ingr.com     **
    ** Intergraph Corporation             MS CR1104     **
    ** Huntsville, AL 35894-0001     (205) 730-6176     **
    **                       FAX:    (205) 730-6011     **
    ******************************************************
* Those not old enough to remember "Tom Swifties" are encouraged
to forgive my lapse of taste ...

Volume-Number: Volume 22, Number 3
Technical Details
Message-ID: <14012@cs.utexas.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!dino!sharkey!umich!samsung!cs.utexas.edu!jsq
References: <13132@cs.utexas.edu> <13219@cs.utexas.edu> <13689@cs.utexas.edu> <13775@cs.utexas.edu> <13878@cs.utexas.edu> <13878@cs.utexas.edu>,

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!dino!sharkey!umich!samsung!cs.utexas.edu!jsq
From: craig@b11.ingr.com (Craig Presson)
Newsgroups: comp.std.unix
Subject: Re: File system name space (was Re: Standards Update, IEEE 1003.4: Real-time Extensions)
Keywords: More Info Please
Message-ID: <14012@cs.utexas.edu>
Date: 24 Oct 90 19:11:32 GMT
References: <13132@cs.utexas.edu> <13219@cs.utexas.edu> <13689@cs.utexas.edu> <13775@cs.utexas.edu> <13878@cs.utexas.edu> <13878@cs.utexas.edu>,
Sender: jsq@cs.utexas.edu
Reply-To: craig@b11.ingr.com (Craig Presson)
Organization: Intergraph Corporation, Huntsville
Lines: 55
Approved: jsq@cs.utexas.edu (Moderator, John S. Quarterman)
X-Submissions: std-unix@uunet.uu.net