duplicate output to multiple terminals

Dan Mercer mercer at ncrcce.StPaul.NCR.COM
Mon Nov 13 07:32:45 AEST 1989


In article <353 at bilver.UUCP> bill at bilver.UUCP (Bill Vermillion) writes:
:In article <256 at telxon.UUCP-> dank at 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 at 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 at ncrcce.StPaul.NCR.COM (Dan Mercer)



More information about the Alt.sources mailing list