home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / programm / 4581 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  1.2 KB

  1. Path: sparky!uunet!auspex-gw!guy
  2. From: guy@Auspex.COM (Guy Harris)
  3. Newsgroups: comp.unix.programmer
  4. Subject: Re: Problem with Pseudo TTY of SunOS 4.1.1 for Sun3
  5. Message-ID: <14513@auspex-gw.auspex.com>
  6. Date: 9 Sep 92 06:44:26 GMT
  7. References: <1992Sep9.010847.1104@pasteur.Berkeley.EDU>
  8. Sender: news@auspex-gw.auspex.com
  9. Distribution: usa
  10. Organization: Auspex Systems, Santa Clara
  11. Lines: 18
  12. Nntp-Posting-Host: auspex.auspex.com
  13.  
  14. >  Is this a bug with SunOS,
  15.  
  16. No, it's a botch in the BSD pseudo-tty implementation; the BSD one let
  17. you do certain tty "ioctl"s on the master side.  It shouldn't have done
  18. so; pseudo-tty masters are *NOT* ttys, they're pseudo-tty masters.
  19.  
  20. The SunOS 4.x pseudo-tty implementation does some old BSD "ioctl"s for
  21. backwards compatibility - and the code to do so is *REALLY GROSS*, as
  22. the STREAMS-based pty implementation doesn't make it at *all* easy to do
  23. that - but it doesn't do the newer "ioctl"s used by "isatty()" and by
  24. the standard I/O library to determine if something is a tty.
  25.  
  26. >or do I need to do something special
  27. >in making the master pty a tty as well?
  28.  
  29. It's *not* a tty.  Explicitly use "setlinebuf()", or "setbuf()", or
  30. "setvbuf()", to control the standard I/O buffering on pseudo-tty
  31. masters.
  32.