Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-lcc!ames!oliveb!sun!gorodish!guy From: guy%gorodish@Sun.COM (Guy Harris) Newsgroups: comp.unix.wizards,comp.emacs Subject: Re: Streams, pseudo-tty's for UTS 5.2.5 Message-ID: <20676@sun.uucp> Date: Tue, 9-Jun-87 00:51:10 EDT Article-I.D.: sun.20676 Posted: Tue Jun 9 00:51:10 1987 Date-Received: Fri, 12-Jun-87 01:02:14 EDT References: <469@cblpe.ATT.COM> Sender: news@sun.uucp Lines: 79 Keywords: streams UTS emacs Xref: mnetor comp.unix.wizards:2664 comp.emacs:1099 > Under BSD, emacs can be compiled to use sockets which, I believe, overcome > these problems (Tell me if this is so, I have little knowledge of sockets > or streams). I presume you mean pseudo-ttys rather than sockets, since you refer to pseudo-ttys elsewhere. Sockets wouldn't help here; they don't act like ttys. (Under 4.[23]BSD, in fact, pipes are implemented on top of sockets) > We have recently upgraded our Amdahl to UTS 5.2.5 which seems > to have support for streams and remote file system. The streams primer > seems to indicate its possible to write a stream module to implement > a pseudo-tty that can let all commands started by emacs appear to be > connected to a real tty but, have there output sent to emacs. > > My knowledge is next to nothing on streams. How does one determine what > streams modules there system has? It depends on your system. If the 3B2's boot-time configuration scheme is used, there's probably a text file somewhere on the system that indicates this. If the streams modules are built in at link time, then there may be a source file that is compiled into the streams module table. If you just get a kernel executable image, there is a table that you can probably find with enough playing with "/dev/kmem". However, the best way would probably be to ask your vendor or check the documentation; if they don't list what streams modules they provide, they goofed. Also note that there is a difference between streams modules (which are sort of like line disciplines) and streams device drivers. The latter appear in the character device switch just as other character device drivers do. The pseudo-tty would have to be a driver, not a streams module. > Are streams modules linked into the kernel? Yes. > If this is true, do they also appear in the file system as device drivers > do? Streams devices do, since they are devices just like other character devices. Streams modules do not. > Have there been any pseudo-tty streams modules written? Yes, but I don't know whether they're available on your machine. > Would it be possible to do what I want? Maybe. The trouble is that a pseudo-tty driver wouldn't be sufficient; the tty subsystem has to be reimplemented to use streams (AT&T has not released any such reimplemented subsystem, unless you count V8 which was only released to a few universities). A "streams pipe" driver, which is supplied with S5R3, might either serve as a pseudo-tty driver or be able to do so with a few changes; however, you'd have to push a "generic tty driver" streams module on top of it, and unless your system has that module you're out of luck. The streams primer may be saying "given the streams framework, you could implement a pseudo-tty device and streams modules to do generic tty driver processing"; in the current situation, this amounts to "if we had some ham, we could have ham and eggs, if we had some eggs". It doesn't mean that the code delivered with S5R3 (I presume the UTS version you are referring to is based on S5R3) includes those modules. > Would it be straightforward to convert the emacs code > that makes the socket calls to use streams? Again, presuming you meant "pseudo-tty" instead of "socket", it would probably be straightforward; setting up the pseudo-tty would be done somewhat differently, but reading and writing from the "controller" side would be done pretty much the same. Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com