The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Paul Riley <paul@rileyriot.com>
To: Noel Chiappa <jnc@mercury.lcs.mit.edu>
Cc: tuhs <tuhs@minnie.tuhs.org>
Subject: Re: [TUHS] V6 Console IO
Date: Fri, 24 Jul 2020 12:54:16 +0800	[thread overview]
Message-ID: <CAD05_j02rqFAENUzQWKEqPXEM5GeyT3qnhoYzoVDKX3Hem3wTg@mail.gmail.com> (raw)
In-Reply-To: <20200724022807.D9E1E18C073@mercury.lcs.mit.edu>

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

Noel,

Thanks for your reply.

I had suspected that the Unix behaviour was responsible, and you've made
that clear with the "line at a time" assertion. I tried removing echo in
STTY, but haven't tried raw.

Paul


*Paul Riley*

Mo: +86 186 8227 8332
Email: paul@rileyriot.com



On Fri, 24 Jul 2020 at 10:28, Noel Chiappa <jnc@mercury.lcs.mit.edu> wrote:

>     > From: Paul Riley
>
>     > I'm struggling however with how C processes the IO. It seems that
> when I
>     > type at the console, my typing is immediately echoed to my terminal
>     > window. ...  nothing appears on the terminal until I press enter,
> when
>     > the system displays the whole line of input ... How
>     > can I suppress the original C/Unix echo, and get my output to appear
>     > immediately?
>
> This is not a C issue; it's the Unix I/O system (and specifically,
> terminal I/O).
>
> Normally, Unix terminal input is done line-at-a-time: i.e. the read() call
> to
> the OS (whether for 1 character, or a large number) doesn't return until an
> enire line has been typed, and [Retrurn] has been hit; then the entire
> line is
> available. While it's being buffered by the OS, echoing is done, and rubout
> processing is also performed.
>
> One can suppress all this; there's a mode call 'raw' (the normal mode is
> sometime labelled 'cooked') which suppresses all that, and just gives one
> the
> characters actually typed, as they are typed. The stty() system call can be
> used to turn this on.
>
> See the V6 tty(IV) manual entry for more. stty() is in stty(II).
>
>     Noel
>

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

  reply	other threads:[~2020-07-24  4:55 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 [this message]
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
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=CAD05_j02rqFAENUzQWKEqPXEM5GeyT3qnhoYzoVDKX3Hem3wTg@mail.gmail.com \
    --to=paul@rileyriot.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).