Xref: utzoo comp.sources.wanted:9385 alt.sources:1208 misc.wanted:6863 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!ncrlnk!ncrcce!mercer From: mercer@ncrcce.StPaul.NCR.COM (Dan Mercer) Newsgroups: comp.sources.wanted,alt.sources,misc.wanted Subject: Re: duplicate output to multiple terminals Message-ID: <1703@ncrcce.StPaul.NCR.COM> Date: 12 Nov 89 20:32:45 GMT References: <256@telxon.UUCP-> <353@bilver.UUCP> Reply-To: mercer@ncrcce.StPaul.NCR.COM (Dan Mercer) Organization: NCR Comten, Inc. Lines: 47 Keywords: In article <353@bilver.UUCP> bill@bilver.UUCP (Bill Vermillion) writes: :In article <256@telxon.UUCP-> dank@telxon.UUCP (Dan Kelley) writes: :-> :->I am looking for an idea to duplicate output on different terminals. :->Obviously, the choice at first is easy, just use the "tee" program :->in this manner: :-> program | tee /dev/tty??? :-> :->Well, I have done this and am still having problems getting everything :->to the device(s). Seems when I run something like a database package, :->I do not get the duplication as I should. In fact, I do not get the :->proper I/O from the program on my own tty. Seems "tee" is not dealing :->with I/O properly and there also may be a buffering problem. : :How about a hardware solution, and take the output going to terminal A and put :it to terminal B through a diode. : :I had a serial board fail in the mode. So that anthing on A went to A & B, :but anything directed to B stayed at B. : : : :-- :Bill Vermillion - UUCP: {uiucuxc,hoptoad,petsd}!peora!tarpit!bilver!bill : : bill@bilver.UUCP In order for tee to work, the program must use stdout and stderr for output. Vi and many other programs require a terminal, so thet open /dev/tty directly. If they are using rawmode input and output, they frequently will do ioctl against stdin, stdout or stderr. If this is a pipe, it will fail (but few people have the sense to check for the failure) and your machines termio will be all screwed up. I had to demo a programming environment that used a rawmode menuing system laid over vi. Consequently, tee would not work. Cu could not handle the high speed of the lines and the large number of rawmode transactions. So I rolled my own, called demo2tty. I can mail it to you if you like. Standard disclaimers apply (SysVr1). To all the net.policeman objecting to this type of entry, may I remind you that management looks askance at any alt groups appearing on the net, and many of us do not have alt.sources.d. -- Dan Mercer Reply-To: mercer@ncrcce.StPaul.NCR.COM (Dan Mercer)