[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: bash exorcism experiment ('bug' 762923 & 763012)

On Thu, 2014-10-02 at 22:50 -0300, Henrique de Moraes Holschuh wrote:
> Debian policy mandates that /bin/sh implement a _superset_ of POSIX, which
> is out of scope for "posh".

Regardless, posh implements all the additional features mandated by

  echo -n, if implemented as a shell built-in, must not generate a

      $ posh -c "echo -n x"

  test, if implemented as a shell built-in, must support -a and -o as
  binary logical operators.

      $ posh -c "test -z '' -a -z '' && echo x; test -z '' -a -n '' && echo y";

      $ posh -c "test -n '' -o -n '' && echo x; test -n '' -o -z '' && echo y";

  local to create a scoped variable must be supported, ...

      $ posh -c 'a=a; x() { local a b c=C; a=A; echo $a$c; }; x; echo $a$c'

   The XSI extension to kill allowing kill -signal, where signal is
   either the name of a signal or one of the numeric signals ...

      $ posh -c 'kill -KILL $$'

   The XSI extension to trap allowing numeric signals must be
   supported. In addition to the signal numbers listed in the
   extension, which are the same as for kill above, 13 (SIGPIPE) must
   be allowed.

    $ posh -c 'trap "echo sigterm" TERM; kill -TERM $$'

Attachment: signature.asc
Description: This is a digitally signed message part

Reply to: