The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Clem Cole <clemc@ccc.com>
To: Noel Chiappa <jnc@mercury.lcs.mit.edu>
Cc: TUHS main list <tuhs@minnie.tuhs.org>
Subject: Re: [TUHS] V6 Console IO
Date: Fri, 24 Jul 2020 10:34:53 -0400	[thread overview]
Message-ID: <CAC20D2OPHVcZqngz-L8e83VzVBXC7hdG-mVANQPLjfrFeWoNBQ@mail.gmail.com> (raw)
In-Reply-To: <20200724022807.D9E1E18C073@mercury.lcs.mit.edu>

[-- Attachment #1: Type: text/plain, Size: 1564 bytes --]

On Thu, Jul 23, 2020 at 10:29 PM Noel Chiappa <jnc@mercury.lcs.mit.edu>
wrote:

>  ...
> This is not a C issue; it's the Unix I/O system (and specifically,
> terminal I/O).


> ...

One can suppress all this; there's a mode call 'raw'
>
Just be sure to turn raw mode off so canonization is performed again after
your program stops running. Remember this a 'system wide' settings for that
try and all programs start to use that setting.   So if some reason, your
program stops and a new program (like the shell) takes back over input from
the try, if you do not have a way to get it back you are screwed.

Back in the day, I have a shell script in my path stored in ~/.bin called: ft
(fix tty) which called the stty command with the way I wanted the
terminal to be set up.   Thus is I was running a program that core dumped
and left the try in raw mode, if I could find a way to run the ft script
(usually by typing ^Jft^J ) life was good again.  Paul, as an exercise why
would ft<CR> not be good enough? (hint read and study the section 4 man
page for stty)

FWIW: is how the original UCB ex/vi  and Cornell's Fred editors for v6
works by the way.  I suspect that iyou look at any of the video editors of
the day it will show you the details.

One of the differences between V7 and earlier UNIX tty handlers was that
they tty canonization was split into multiple parts.   Also the other hint
with Sixthedition's version of raw and cooked modes, you get all or nothing so
you if you turn on raw, your program, will have do things like backspace
processing, *etc*..

[-- Attachment #2: Type: text/html, Size: 4020 bytes --]

  parent reply	other threads:[~2020-07-24 14:36 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-24  2:28 Noel Chiappa
2020-07-24  4:54 ` Paul Riley
2020-07-24 16:37   ` Random832
2020-07-24 17:15     ` Clem Cole
2020-07-25  2:45       ` Random832
2020-07-24 14:34 ` Clem Cole [this message]
2020-07-25  2:48   ` Paul Riley
2020-07-25  4:02     ` John Cowan
2020-07-25 15:09       ` Clem Cole
2020-07-25 15:31         ` Richard Salz
2020-07-26  1:08           ` Random832
2020-07-27  9:11             ` Paul Riley
  -- strict thread matches above, loose matches on Subject: below --
2020-07-25 17:45 Noel Chiappa
2020-07-24 14:33 Noel Chiappa
2020-07-24 14:36 ` Clem Cole
2020-07-25  1:53   ` Dave Horsfall
2020-07-24  0:18 Paul Riley
2020-07-24  2:57 ` Larry McVoy
2020-07-24  4:41   ` Paul Riley
2020-07-24  4:54     ` Paul Riley
2020-07-24 14:01       ` Larry McVoy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAC20D2OPHVcZqngz-L8e83VzVBXC7hdG-mVANQPLjfrFeWoNBQ@mail.gmail.com \
    --to=clemc@ccc.com \
    --cc=jnc@mercury.lcs.mit.edu \
    --cc=tuhs@minnie.tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).