sh: Sync with FreeBSD
authorPeter Avalos <pavalos@dragonflybsd.org>
Wed, 31 Jul 2013 02:47:45 +0000 (19:47 -0700)
committerPeter Avalos <pavalos@dragonflybsd.org>
Wed, 31 Jul 2013 18:42:10 +0000 (11:42 -0700)
commitb1abb130dc3100539f3e1892b00b670204e945d6
tree917efe45ac74711dd8dbb8c18511ee5d018f00db
parent5f3dc7d423d8818b05d9d2fab81c4e2a429e9c88
sh: Sync with FreeBSD

* Recognize "--" and explicitly reject options in wait builtin.
* Mention possible ambiguities with $(( and ((.
* Write as much into the heredoc pipe as possible, to avoid forking.
* Don't modify exit status when break/continue/return passes !.
* Document a few expansions for the $PS1 and $PS2 environmental
  variables.
* Don't consider jobs -s/-p as reporting the status of jobs.
* Improve error handling in read builtin.
* Use O_CLOEXEC and F_DUPFD_CLOEXEC instead of separate fcntl() call.
* Remove linked list of stack marks.
* Allow multiple operands in wait builtin.
* Return status 127 for unknown jobs in wait builtin.
* Do not read from stdin if an error occurs during -i -c cmd.
* Remove mkinit.

Obtained-from:   FreeBSD
36 files changed:
bin/sh/Makefile
bin/sh/TOUR
bin/sh/eval.c
bin/sh/eval.h
bin/sh/exec.c
bin/sh/expand.c
bin/sh/init.h [deleted file]
bin/sh/input.c
bin/sh/input.h
bin/sh/jobs.c
bin/sh/main.c
bin/sh/memalloc.c
bin/sh/memalloc.h
bin/sh/miscbltin.c
bin/sh/mkinit.c [deleted file]
bin/sh/nodes.c.pat
bin/sh/output.c
bin/sh/parser.c
bin/sh/parser.h
bin/sh/redir.c
bin/sh/redir.h
bin/sh/sh.1
bin/sh/shell.h
bin/sh/trap.c
tools/regression/bin/sh/builtins/break4.4 [new file with mode: 0644]
tools/regression/bin/sh/builtins/break5.4 [new file with mode: 0644]
tools/regression/bin/sh/builtins/eval6.0 [new file with mode: 0644]
tools/regression/bin/sh/builtins/local2.0 [new file with mode: 0644]
tools/regression/bin/sh/builtins/local3.0 [new file with mode: 0644]
tools/regression/bin/sh/builtins/read7.0 [new file with mode: 0644]
tools/regression/bin/sh/builtins/wait10.0 [new file with mode: 0644]
tools/regression/bin/sh/builtins/wait8.0 [new file with mode: 0644]
tools/regression/bin/sh/builtins/wait9.127 [new file with mode: 0644]
tools/regression/bin/sh/execution/int-cmd1.0 [new file with mode: 0644]
tools/regression/bin/sh/execution/not1.0 [new file with mode: 0644]
tools/regression/bin/sh/execution/not2.0 [new file with mode: 0644]