Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!homxb!whuts!mtune!rutgers!ukma!uunet!mcvax!ukc!its63b!aiva!richard From: richard@aiva.UUCP Newsgroups: comp.arch,comp.unix.wizards Subject: pseudo terminals Message-ID: <186@aiva.ed.ac.uk> Date: Fri, 30-Oct-87 08:14:03 EST Article-I.D.: aiva.186 Posted: Fri Oct 30 08:14:03 1987 Date-Received: Tue, 3-Nov-87 01:53:35 EST References: <573@elxsi.UUCP> <682@its63b.ed.ac.uk> <796@quacky.UUCP> <421@nuchat.UUCP> <3619@sol.ARPA> <705@its63b.ed.ac.uk> Reply-To: richard@uk.ac.ed.aiva (Richard Tobin) Followup-To: comp.unix.wizards Organization: AI Applications Institute, Edinburgh University Lines: 37 Keywords: output pagination Xref: utgpu comp.arch:2596 comp.unix.wizards:4871 [In a discussion of output pagination in comp.arch...] In article <705@its63b.ed.ac.uk> simon@its63b.ed.ac.uk (Simon Brown) writes: >Unfortunately, it isn't (so far as I know) possible to detect tty-mode changes >over a pty, which means that the paging could *not* be automatically disabled >if the command puts the terminal (ie, the slave end of the pty) into raw or >cbreak mode, which wouldn't be the best at all. Yes, this is something I've found awkward. I wanted to write a program that would provide command line editing in the style of tcsh (or indeed Simon Brown's ssh) for all programs. This would be done using a pseudo-terminal and a filter program. However, the inability to detect cooked-raw-cbreak mode changes means this won't work if you want to be able to use screen editors and the like. In fact, it is possible to detect mode changes sometimes - a pseudo terminal in packet mode can detect when the slave end flushes input, which usually happens when changing modes (NB this is all BSD-specific). What would be really useful would be a device that merely passed everything from its slave end to its master end, including ioctls. Ioctls calls at the slave end would (optionally? - certainly in the case of GET ioctls) suspend until the master end had processed it. Has any unix system had such a device? As well as the paging/editing applications, it could be used for prototyping other device drivers; much of the debugging could be done with the driver in user code, rather than the kernel. I did, in fact, write such a device driver and used it on a sun to run suntools in a window and across the network. Response was, of course, quite abysmal. As this has little to do with computer architecture, I'm redirecting followups to comp.unix.wizards. -- Richard Tobin, JANET: R.Tobin@uk.ac.ed AI Applications Institute, ARPA: R.Tobin%uk.ac.ed@nss.cs.ucl.ac.uk Edinburgh University. UUCP: ...!ukc!ed.ac.uk!R.Tobin