The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Steffen Nurpmeso <steffen@sdaoden.eu>
To: Douglas McIlroy <douglas.mcilroy@dartmouth.edu>
Cc: TUHS main list <tuhs@minnie.tuhs.org>
Subject: Re: [TUHS] Why does shell write to stderr?
Date: Thu, 07 Apr 2022 23:32:34 +0200	[thread overview]
Message-ID: <20220407213234.7sGk5%steffen@sdaoden.eu> (raw)
In-Reply-To: <CAKH6PiXBEZPyjUk=DD8moA8ZnA2kpfk=Z7+6WwckSQb5HPUX3Q@mail.gmail.com>

Douglas McIlroy wrote in
 <CAKH6PiXBEZPyjUk=DD8moA8ZnA2kpfk=Z7+6WwckSQb5HPUX3Q@mail.gmail.com>:
 |How would you wish to interact with
 |        /bin/bash >file

While the POSIX standard defines an interactive shell as one with
STDIN and STDERR being a terminal, i think the NetBSD shell did
not until not too long (< half a decade?) ago, and the mailer you
were using for a long time does not to this day.  (Unfortunately.)

  APPLICATION USAGE
  Standard input and standard error are the files that determine
  whether a shell is interactive when -i is not specified. For
  example:

    sh > file
  and:
    sh 2> file

  create interactive and non-interactive shells,
  respectively. Although both accept terminal input, the results of
  error conditions are different, as described in Section 2.8.1 (on
  page 2363); in the second example a redirection error encountered
  by a special built-in utility aborts the shell.

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)

  reply	other threads:[~2022-04-07 21:35 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 [this message]
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
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=20220407213234.7sGk5%steffen@sdaoden.eu \
    --to=steffen@sdaoden.eu \
    --cc=douglas.mcilroy@dartmouth.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).