NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
standards/52406: POSIX requires sh(1)ell interactivity for IN/ERR, not IN/OUT
>Number: 52406
>Category: standards
>Synopsis: POSIX requires sh(1)ell interactivity for IN/ERR, not IN/OUT
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: standards-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jul 15 13:30:00 +0000 2017
>Originator: Steffen
>Release: kre
>Organization:
>Environment:
Subject: Re: Future shell work - comments reqyuested
Date: Sat, 15 Jul 2017 19:52:42 +0700
Message-ID: <16608.1500123162%andromeda.noi.kre.to@localhost>
>Description:
In said thread it was revealed that NetBSD shell (and BSD Mail) treat isatty(STDIN/STDOUT) as being interactive, whereas POSIX requires isatty(STDIN/STDERR) for this condition.
POSIX 2008/Cor 2-2016, p. 3226, line 108308 ff.:
If the −i option is present, or if there are no operands and the shell?s standard input and
standard error are attached to a terminal, the shell is considered to be interactive.
and, ditto, p. 3239, line 108848 ff.:
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.
>How-To-Repeat:
>Fix:
I expect a painful and lengthy code audit for BSD Mail. I do not know about the shell.
Home |
Main Index |
Thread Index |
Old Index