Bug 1107 - interactivity decision doesn't conform to SUSv3 (SUSv2+POSIX descendant)
: interactivity decision doesn't conform to SUSv3 (SUSv2+POSIX descendant)
Status: CLOSED FIXED
: Sisyphus
(All bugs in Sisyphus/sh)
: unstable
: all Linux
: P4 minor
Assigned To:
:
:
:
:
:
  Show dependency tree
 
Reported: 2002-07-16 14:05 by
Modified: 2006-01-06 21:59 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2002-07-16 14:05:15
The man-page of bash, and its behavior is different from what the revision to
POSIX and Single Unix Specification says.

Below I refer to the specification taht can be accessed at <a
href="http://www.UNIX-systems.org/version3/online.html">http://www.UNIX-systems.org/version3/online.html</a>,
the locations are relative to <a
href="http://www.opengroup.org/onlinepubs/SOME_NUMBER">http://www.opengroup.org/onlinepubs/SOME_NUMBER</a>
after you login (free).


According to the specification
(utilities/sh.html#tag_04_128_04), intercarivity decision should be based on
whether stdin and stderr are connected to a terminal, stdout is not important.
But /bin/sh\'s decision is based on whether stdin and stdout is connected to a
terminal, stderr is not taken into account.

---
Running the test from utilities/sh.html#tag_04_128_16

1:

$ bash
$ echo $-
bhimBH
$ exit

Fine.


2:

$ bash &gt; o
echo $-
$ cat o
hB
$ bash 2&gt; o
bhimBH

bash doen\'t conform to POSIX: stdout and sterr roles are swapped.

3: 

$ /bin/sh &gt; o
echo $-
$ cat o
hB
$ /bin/sh 2&gt; o
echo $-
himB
$ cat o
sh-2.05a$ sh-2.05a$ exit

/bin/sh doesn\'t conform to POSIX, the same reason.

4:

$ /bin/sh --posix &gt; o
echo $-
$ cat o
hB
$ /bin/sh --posix 2&gt; o
echo $-
himB
$ 

/bin/sh --posix doen\'t conform to POSIX; the same reason.

---
sh-2.05a-alt2
------- Comment #1 From 2006-01-03 02:58:58 -------
Seems to be fixed in bash-3.0
------- Comment #2 From 2006-01-06 21:59:02 -------
Fixed in 3.1.1-alt1.