How do I catch all output

Neil Rickert rickert at mp.cs.niu.edu
Wed May 8 00:50:54 AEST 1991


In article <1991May7.143641.10066 at cbnewsl.att.com> urban at cbnewsl.att.com (john.urban) writes:
>In article <y3cG#taz1 at cs.psu.edu> cho at sol4.cs.psu.edu (Sehyeong Cho) writes:
>>Hi, wizards.
>>I know I can use ioctl to simulate keyboard input.
>>But I don't know how to catch all output to my terminal (similar to
>
>I've held off answering this question for some time.  Too see if any good
>answers appear.  I really haven't seen any.

 On answer is to move the session logging back one stage.  If you login from
some kind of PC with a terminal emulation program, you may be able to
cajole the terminal emulator to log the complete session.  (Recent
version of kermit on many different types of micro support this, for example.)

 As another choice, I suppose you could originally login in with a different
account, turn off talk, biff, etc, then invoke script.  From script make the
first command 'exec login', which should set up the right permissions on the
pty, add the utmp entry, etc.  Hopefully 'talk' sessions will then go through
your script session.  The price you pay is having to login twice.

 Of course you may leave the pty with the wrong ownership and permissions,
causing trouble for the next potential user of that pty.  And your entry in
utmp may not be properly removed.  I guess you can't have everything.

-- 
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
  Neil W. Rickert, Computer Science               <rickert at cs.niu.edu>
  Northern Illinois Univ.
  DeKalb, IL 60115                                   +1-815-753-6940



More information about the Comp.unix.wizards mailing list