The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Rob Pike <robpike@gmail.com>
To: George Michaelson <ggm@algebras.org>
Cc: TUHS main list <tuhs@minnie.tuhs.org>
Subject: Re: [TUHS] Why does shell write to stderr?
Date: Fri, 8 Apr 2022 09:51:18 +1000	[thread overview]
Message-ID: <CAKzdPgzvWasb9gatMvoQT+EgQn65Ff+qbMK1tThdFr_D5qNSgg@mail.gmail.com> (raw)
In-Reply-To: <CAKr6gn0Nhn+YDtrmu_3SEphC_L879vcmvB_qkQUm8NPfJ-ND7A@mail.gmail.com>

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

If you never ring the bell in the editor, the issue never comes up, the
code is simpler, and there's less to understand.

-rob


On Fri, Apr 8, 2022 at 8:33 AM George Michaelson <ggm@algebras.org> wrote:

> I also had extreme WTF the first time I looked in code and saw an
> isatty() guard over some activity.
>
> "this program processes stdin to stdout, except.. if I decide
> otherwise" never appeared in man pages.
>
> But that said, it sort of made sense. Why ring bell in an editor, if
> you know the input pipe side can't hear it? A tty is a rather strange
> device being the join over stdout, stdin and stderr, and there is a
> (tiny?) set of things which need to know.
>
> more for instance, probably needs to know that waiting for a command
> to move pagination onward if there is no controlling terminal is not
> sensible. If you want your input in chunks, more is not the way to do
> it.
>
> I hate special cases. This is why people say english is so hard to
> learn but really all languages have them, its just that english having
> stolen words from everywhere has more instances of isatty() than
> others.
>
> -G
>

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

  reply	other threads:[~2022-04-07 23:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-07 21:11 Douglas McIlroy
2022-04-07 21:32 ` Steffen Nurpmeso
2022-04-07 21:36 ` Richard Salz
2022-04-07 22:15   ` Rob Pike
2022-04-07 22:30     ` George Michaelson
2022-04-07 23:51       ` Rob Pike [this message]
2022-04-09  1:46         ` John Cowan
2022-04-09  1:53           ` George Michaelson
2022-04-09 18:05           ` Steffen Nurpmeso
  -- strict thread matches above, loose matches on Subject: below --
2022-04-08  9:34 Paul Ruizendaal via TUHS
2022-04-07 17:45 Richard Salz

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=CAKzdPgzvWasb9gatMvoQT+EgQn65Ff+qbMK1tThdFr_D5qNSgg@mail.gmail.com \
    --to=robpike@gmail.com \
    --cc=ggm@algebras.org \
    --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).