home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / pyramid / 233 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  1.8 KB

  1. Path: sparky!uunet!uswnvg!nv77.uswnvg.com!rfadler
  2. From: rfadler@uswnvg.com (Rick Fadler (206) 450-8575)
  3. Newsgroups: comp.sys.pyramid
  4. Subject: psuedo-ttys on OSx 5.1a
  5. Keywords: pty ioctl
  6. Message-ID: <3006@uswnvg.uswnvg.com>
  7. Date: 18 Dec 92 16:28:27 GMT
  8. Sender: news@uswnvg.uswnvg.com
  9. Distribution: usa
  10. Organization: U S WEST NewVector Group, Inc.
  11. Lines: 29
  12. X-Newsreader: Tin 1.1 PL5
  13.  
  14. I have recently inherited some code that, unfortunately was not completed 
  15. before the original author left. As a result I have come across some 
  16. interesting system calls that appear to be undocumented.
  17.  
  18. The calls are, open_controlling_pty and open_slave_pty. They are both found
  19. in the library /usr/.ucblib/libpyr.a.
  20.  
  21. What is unusual is that when I run the application with a regular user id
  22. they work fine, but when executed as root the function
  23. "open_controlling_pty" causes a coredump.  I have traced the dump using dbx
  24. and it points to open_controlling_pty.
  25.  
  26. This doesn't make sense to me and so far I have found no manual pages or
  27. other documentation on this function. Unfortunately the programmer who wrote
  28. the code is no longer here to explain it all to me.
  29.  
  30. My second question is once I get the master pty open (which works when run
  31. as a regular user) I try to send data to the master pty. Unfortunately local
  32. echo of NL "ECHONL" is enabled on the pty which causes any new line that
  33. is sent to the pty to be echoed back to the application.  This is causing a
  34. whole lot of problems. I have tried to use ioctl to turn off ECHONL but even
  35. though the ioctl succeeds, when I check the setting ECHONL is still turned
  36. on.  One collegue suggested that perhaps only a subset of the requests are
  37. valid when you are dealing with a master pty. Does anyone know of any
  38. documentation concerning ioctl and ptys?
  39.  
  40. Any advice, comments, jokes, etc. would be appriciated.
  41.  
  42. Rick Fadler
  43.