[Bug 1196127] [NEW] dash -i -c may prompt for input from stdin/terminal

a7x 1196127 at bugs.launchpad.net
Sat Jun 29 20:49:25 UTC 2013


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
Foundations Bugs, which is subscribed to dash in Ubuntu.
https://bugs.launchpad.net/bugs/1196127

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

Status in “dash” package in Ubuntu:
  New

Bug description:
  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.

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




More information about the foundations-bugs mailing list