Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!bridge2!jarthur!nntp-server.caltech.edu!arrester!cripple From: czim@kafka.cns.caltech.edu (Chris Ziomkowski) Newsgroups: comp.unix.questions Subject: Need help setting up termios for use with a pseudo terminal. Message-ID: <1991Apr7.213104.12855@nntp-server.caltech.edu> Date: 7 Apr 91 21:31:04 GMT Sender: cripple@arrester (Chris Ziomkowski) Organization: California Institute of Technology, Pasadena Lines: 24 For various reasons, I need to write a program that acts similarly to rlogin. I've managed to open up a pseudo terminal but am having trouble figuring out how to set up the termios on the master side. I think I'm missing a basic concept of how this works. I'm writing for a Berkely environment, and currently I'm using non blocking io to read() characters from stdin and then write() them to the master. I have another process where I read() from the master using non blocking io and then write to stdout. This works all fine and dandy, except that I can't figure out how to get erase and kill processing to work. For instance, when the slave is executing a program like csh, hitting the rubout key should echo bs-sp-bs to the screen. On the other hand, when running a program such as emacs, no such processing should occur. Basically, a program can set the slave up any way it wants to. I have a canonical input processor that I wrote a while back which I could use while reading from stdin, but then programs such as emacs and vi would not work properly. How should I deal with this? Does anyone know how programs such as rlogin and telnet get around this problem? Any help will be greatly appreciated. Thanks in advance... Chris. czim@cns.caltech.edu