home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.22 / text0009.txt < prev    next >
Encoding:
Text File  |  1991-03-06  |  1.3 KB  |  29 lines

  1. Submitted-by: jfh@rpp386.cactus.org (John F. Haugh II)
  2.  
  3. In article <14110@cs.utexas.edu> gwyn@smoke.brl.mil (Doug Gwyn) writes:
  4. >That's the most common implementation.  However, /dev/fd could also be
  5. >implemented as a filesystem type of its own, and I'd actually prefer
  6. >that.  Then an "ls /dev/fd" would show just the in-use file descriptors.
  7.  
  8. Which brings up the issue of "whose in-use file descriptors?".
  9. It would work just fine for the application itself, but "ls" would
  10. be useless if you define "in-use" to be the current process' in-use
  11. descriptors.  Gee, how many times do you want to see which file
  12. descriptors "ls" has open.
  13.  
  14. This works with /proc because processes are system wide, while file
  15. descriptors are per-process.  My fd0 has nothing in common with your
  16. fd0 - so either I distinguish between my fd0 and your fd0 and get
  17. stuck with fondling every user-page in the system, or I just cop out.
  18.  
  19. A more complex inplementation buys little or nothing in terms of
  20. function at a very high cost in terms of overhead.
  21. -- 
  22. John F. Haugh II                             UUCP: ...!cs.utexas.edu!rpp386!jfh
  23. Ma Bell: (512) 832-8832                           Domain: jfh@rpp386.cactus.org
  24. "SCCS, the source motel!  Programs check in and never check out!"
  25.         -- Ken Thompson
  26.  
  27. Volume-Number: Volume 22, Number 10
  28.  
  29.