home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.21 / text0210.txt < prev    next >
Encoding:
Text File  |  1990-10-26  |  1.6 KB  |  33 lines

  1. Submitted-by: arnold%audiofax.com@mathcs.emory.edu (Arnold Robbins)
  2.  
  3. (It's about time the subject line on this one got changed, don't you think?)
  4. [Seems plausible to me.  -mod]
  5.  
  6. Anyway, since we're discussing what is and isn't in the POSIX name space,
  7. I'd like to put in a plug for the /dev/fd directory.  Opening /dev/fd/7 is
  8. equivalent to doing a dup(7); it is a generalization of the "treat '-' as
  9. stdin" hack used by cat and awk (and others) and allows at least two shells
  10. (ksh and rc [see your nearest V10 manual]) to do interesting things like set
  11. up non-linear pipelines.  (At least I think rc does it.  I know ksh does.)
  12.  
  13. There's lot of existing practice on this one; it originated in V8, circa
  14. 1984 or earlier, and PD versions for various, more popular, Unix incarnations
  15. have been around for some time as well.
  16.  
  17. (In fact, in V8 - V10, /dev/stdin, /dev/stdout, /dev/stderr, and /dev/tty are
  18. links to /dev/fd/0, /dev/fd/1, /dev/fd/2, and /dev/fd/3, respectively.  The
  19. last, in particular, is a nice generalization, and eliminates an ugly special
  20. case in the kernel; init just does one more dup.)
  21.  
  22. It's going to be fun watching how /dev/fd will be presented as both for and
  23. against the case for "fd-centric" Unix... :-)  Personally, I'm in the put-it-
  24. in-the-filesystem camp.
  25. -- 
  26. Arnold Robbins                AudioFAX, Inc. | Laundry increases
  27. 2000 Powers Ferry Road, #200 / Marietta, GA. 30067     | exponentially in the
  28. INTERNET: arnold@audiofax.com Phone:   +1 404 933 7612 | number of children.
  29. UUCP:      emory!audfax!arnold Fax-box: +1 404 618 4581 |   -- Miriam Robbins
  30.  
  31. Volume-Number: Volume 21, Number 209
  32.  
  33.