[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Killing the rest of MORE in a terminal session
Date: Tue, 6 Mar 90 01:21:57 EST
From: barmar@Think.COM
Date: Mon, 5 Mar 90 12:03:32 MST
From: drstrip@cs.sandia.gov (David R Strip (1411))
When using a terminal window to a UNIX box over e-net, if I cat
a file (for example), the whole file gets sent and the lispm does
mnore processing on it. If I don't want to see any more, control-c
has not impact since the file has already been sent. How do I tell the
terminal window to not display what is sitting around waiting to be
MORE'd to me?
You can't do this. There's nothing in the TELNET protocol that indicates
where the end of a particular command's output is, so how would the Lispm
know when to stop throwing away output? Basing it on the amount buffered
in the Lispm's memory is extremely unreliable, as there is no reason to
believe that this will be all the output from the command (the Lispm only
buffers 20,000 bytes), and the buffered output could even end in the middle
of an escape sequence.
Well, not entirely true. If you're using TELNET (not, say, SUPDUP), and if
you're willing to do a little hacking, you might be able to win. You need to
send the Telnet codes IAC ABORT-OUTPUT to the other end before you send the, for
example, c-C (or better yet, IAC INTERRUPT-PROCESS, to be completely within the
TELNET protocol). Come to think of it, IAC IP is supposed to imply AO, so it may
be sufficient to send the IP. I believe this is done when you press the Abort
key on the Lispm keyboard (try this instead of c-C to see what happens). Of
course, I don't know if the Lispm does a :CLEAR-INPUT on the input stream as
well, to get rid of the 20K buffered bytes; it should do this at least for AO,
and if IP implies AO, it should do it then as well).