Bug 1093 - interactivity decision doesn\'t conform to doc
: interactivity decision doesn\'t conform to doc
Status: CLOSED NOTABUG
: Sisyphus
(All bugs in Sisyphus/bash)
: unstable
: all Linux
: P4 minor
Assigned To:
:
:
:
:
:
  Show dependency tree
 
Reported: 2002-07-14 22:51 by
Modified: 2003-08-25 15:18 (History)


Attachments


Note

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


Description From 2002-07-14 22:51:05
The second paragraph in section INVOCATION in bash(1) defines when the shell
should be interactive.

According to my tests, the most important part (/bin/bash with stdin and stdout
connected to terminals) is not valid for bash.

---
I run a simple executable from an xterm (or linux console):
#!/bin/bash

echo \"$-\"

and get:

$ ./interact.sh           
hB
$ 

After I modify the first line to be \'#!/bin/bash -i\', I get:
$ ./interact.sh 
bhimB
$ 

but, according to the man-page, there should be no difference.

---
bash-0:2.05a-alt2;
this wasn\'t so in bash-0:2.05-alt6.

glibc-2.2.5-alt10 (isatty works correctly)

An issue connected to the wrong decision made by bash on whether it is
interactive or not is that bash doesn\'t set $COLUMNS in most scripts. 
------- Comment #1 From 2002-07-15 18:05:38 -------
manpage have to be updated.
------- Comment #2 From 2002-07-15 18:05:38 -------
manpage have to be updated.
------- Comment #3 From 2002-07-16 13:50:48 -------
Now I see that the old beahvior was not right (didn\'t conform to the
man-page), because according to execve(2) a bash-script would be called like
this:

/bin/bash scriptname

so /bin/bash has non-option arguments, and thus (according to INVOCATION) the
shell should be non-interactive (even if the stdin and stdout are connected to
terminals).
------- Comment #4 From 2002-07-16 13:50:48 -------
Now I see that the old beahvior was not right (didn\'t conform to the
man-page), because according to execve(2) a bash-script would be called like
this:

/bin/bash scriptname

so /bin/bash has non-option arguments, and thus (according to INVOCATION) the
shell should be non-interactive (even if the stdin and stdout are connected to
terminals).
------- Comment #5 From 2002-07-16 13:51:24 -------
The man-page is correct, the beahvior conforms to the man-page, previous
version of bash did it the wrong way. This is not a bug.
------- Comment #6 From 2002-07-16 13:51:24 -------
The man-page is correct, the beahvior conforms to the man-page, previous
version of bash did it the wrong way. This is not a bug.