dash -i -c may prompt for input from stdin/terminal
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dash (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
http://
> The standard input shall be used only if one of the following is true:
> * The -s option is specified.
> * The -c option is not specified and no operands are specified.
> * The script executes one or more commands that require input from
> standard input (such as a read command that does not redirect
> its input).
However, if you run:
dash -i -c 'if'
then dash will drop to a prompt waiting for input from the terminal/stdin (after printing an error message for the legitimate syntax error. It should simply exit.
Another way to test this:
dash -i -c 'read foo'
and then hit Ctrl-C. It will drop to a prompt when it should exit.