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