SVR3.0 vs BSD4.3 script implementations
Doug Gwyn
gwyn at brl-smoke.ARPA
Thu Mar 31 04:55:39 AEST 1988
In article <2353 at ea.ecn.purdue.edu>, cyliax at ea.ecn.purdue.edu (Ingo Cyliax) writes:
> In article <7581 at brl-smoke.ARPA> gwyn at brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>) writes:
> >In article <12690 at brl-adm.ARPA> rbj at icst-cmr.arpa (Root Boy Jim) writes:
> >> From: Doug Gwyn <gwyn at brl-smoke.arpa>
> >> > "script" for recording terminal session
> >> "Script" screws up the application running under it sometimes. It
> >> could be implemented almost trivially with STREAMS. Somebody should
> >> do so.
> >>Interesting. Please elaborate.
> >Elaborate on what? The screw-up is that certain operations do not
> >work right on ptys.
> Yeah, like what "certain operations" don't work right on pty's ? I guess
> setting the baudrate probably doesn't make too much sense :-).
See below.
As to Norman's short shell script implementation of "script",
it was just an experiment; obviously, for actual use one
would use an implementation that propagates signals
properly (which of necessity would not be a shell script).
The point was that it backed up my claim that it is almost
trivial to implement "script" using streams.
> The last time I ran layers with rlogin under Sys V,
> it didn't work too well!
"rlogin" is not part of UNIX System V. Apparently whoever you
got it from didn't make it handle window changes correctly,
but UNIX System V does have the necessary support.
-----
One pty botch makes it impossible to use the usual DMD implementation
of "hostagent". In the following, I'm using "layers" and "mpx"
implementations that avoid problems with hostagent and which work
fine when not running under "script". These are extremely important
programs in our environment; they manage 5620 or 630 host processes.
Here's a sample script from host VGR.BRL.MIL, a DEC VAX-11/780x2
running 4.3BSD:
Script started on Wed Mar 30 12:36:56 1988
VGR:~$ layers
layers - error - You don't seem to be in utmp
VGR:~$ who am i
brl-vgr! ttyp1 Mar 30 12:36
VGR:~$ who
ryan ttyh0 Mar 30 12:53 (line 751)
ge ttyh1 Mar 30 12:56 (line 173)
gwyn ttyh2 Mar 30 13:09 (line 310)
jeffh ttyp0 Mar 30 07:44 (vandal.brl.mil)
moss ttyp3 Mar 30 08:43 (brl-viva.arpa)
eskimo ttyp4 Mar 30 08:45 (skunk.brl.mil)
VGR:~$ tty
/dev/ttyp1
VGR:~$ exit
script done on Wed Mar 30 12:37:30 1988
Didn't get very far, did we?
Here's a script from host VMB.BRL.MIL, a Gould PowerNode 9080
running a release of UTX-32 that is based on 4.3BSD:
Script started on Wed Mar 30 12:38:52 1988
VMB:~$ who am i
brl-vmb!gwyn ttype Mar 30 12:38 (null)
VMB:~$ mpx
^[[c^[[2;0v^C^D^B^C^A:^C^D^B^C^A:^C^D^B^C^A: etc. forever
At least VMB updates /etc/utmp properly, but "mpx" never gets
a response from the 630 MTG terminal.
I leave it as an exercise for the student to explain what causes
these problems. However, this does show that 4.3BSD "script"
is by no means transparent.
More information about the Comp.unix.wizards
mailing list