<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>1107</bug_id>
          
          <creation_ts>2002-07-16 14:05:15 +0400</creation_ts>
          <short_desc>interactivity decision doesn&apos;t conform to SUSv3 (SUSv2+POSIX descendant)</short_desc>
          <delta_ts>2006-01-06 21:59:02 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>sh</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P4</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="imz">vanyaz</reporter>
          <assigned_to name="placeholder@altlinux.org">placeholder</assigned_to>
          <cc>glebfm</cc>
    
    <cc>ldv</cc>
    
    <cc>placeholder</cc>
    
    <cc>vt</cc>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1055</commentid>
    <comment_count>0</comment_count>
    <who name="imz">vanyaz</who>
    <bug_when>2002-07-16 14:05:15 +0400</bug_when>
    <thetext>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 &lt;a href=&quot;http://www.UNIX-systems.org/version3/online.html&quot;&gt;http://www.UNIX-systems.org/version3/online.html&lt;/a&gt;, the locations are relative to &lt;a href=&quot;http://www.opengroup.org/onlinepubs/SOME_NUMBER&quot;&gt;http://www.opengroup.org/onlinepubs/SOME_NUMBER&lt;/a&gt; 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\&apos;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 &amp;gt; o
echo $-
$ cat o
hB
$ bash 2&amp;gt; o
bhimBH

bash doen\&apos;t conform to POSIX: stdout and sterr roles are swapped.

3: 

$ /bin/sh &amp;gt; o
echo $-
$ cat o
hB
$ /bin/sh 2&amp;gt; o
echo $-
himB
$ cat o
sh-2.05a$ sh-2.05a$ exit

/bin/sh doesn\&apos;t conform to POSIX, the same reason.

4:

$ /bin/sh --posix &amp;gt; o
echo $-
$ cat o
hB
$ /bin/sh --posix 2&amp;gt; o
echo $-
himB
$ 

/bin/sh --posix doen\&apos;t conform to POSIX; the same reason.

---
sh-2.05a-alt2
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>34406</commentid>
    <comment_count>1</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2006-01-03 02:58:58 +0300</bug_when>
    <thetext>Seems to be fixed in bash-3.0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>34482</commentid>
    <comment_count>2</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2006-01-06 21:59:02 +0300</bug_when>
    <thetext>Fixed in 3.1.1-alt1.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>