home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / v22 / 018 / text0000.txt < prev   
Encoding:
Text File  |  1991-03-07  |  2.1 KB  |  42 lines

  1. Submitted-by: arnold%audiofax.com@mathcs.emory.edu (Arnold Robbins)
  2.  
  3. In article <14162@cs.utexas.edu> ske@pkmab.se (Kristoffer Eriksson) writes:
  4. >If you have a program that closes only fd 3, this implementation will behave
  5. >differently from the old /dev/tty device implementation, won't it? You will
  6. >not be able to reach the controlling terminal by a guaranteed route, in spite
  7. >of the fact that it is still available on other fd-s.
  8.  
  9. This is correct.  It's mostly irrelevant though; in current Unix systems if
  10. you do the right magic you can't get use /dev/tty even though the terminal is
  11. still available on the currently open file descriptors.  Six of one, a
  12. half-dozen of the other, as they say.
  13.  
  14. >Or is the controlling
  15. >terminal concept implemented in such a way that closing fd 3 is the same as
  16. >disassociating from the controlling terminal (so you won't be bother with
  17. >terminal interrupts and such) ?
  18.  
  19. I don't think this is the case.  V10 still has the concept of a "controlling
  20. terminal", but I strongly doubt that the kernel knows it's on fd 3.  However,
  21. the controlling terminal isn't as pervasive a concept in Research Unix as it
  22. is in BSD or System V.  (In BSD, if you disassociate yourself from the
  23. controlling terminal, and then open some random /dev/tty<whatever>, it
  24. automatically becomes your controlling terminal.  In V10 you'd have to
  25. explicitly make that happen.)
  26.  
  27. Let me make a clarifying statement.  There are two things under discussion.
  28. 1) the usefulness of /dev/fd, 2) the usefulness of having /dev/tty be
  29. /dev/fd/3.   Everyone who's actually used /dev/fd feels it's useful, so
  30. we can take point 1) as a given for a nice feature.  Point 2) has its
  31. plusses and minuses, but, IMO, the minuses don't outweigh the plusses.
  32. Also, if it's good enough for Dennis Ritchie, it's probably good enough
  33. for me. :-)
  34. -- 
  35. Arnold Robbins                AudioFAX, Inc. | Laundry increases
  36. 2000 Powers Ferry Road, #200 / Marietta, GA. 30067     | exponentially in the
  37. INTERNET: arnold@audiofax.com Phone:   +1 404 933 7612 | number of children.
  38. UUCP:      emory!audfax!arnold Fax-box: +1 404 618 4581 |   -- Miriam Robbins
  39.  
  40. Volume-Number: Volume 22, Number 18
  41.  
  42.