Public bug reported:

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sh.html#tag_20_117_06
says:

> 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.

** Affects: dash (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1196127

Title:
  dash -i -c may prompt for input from stdin/terminal

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dash/+bug/1196127/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to