sh: Update associated state when restoring locals while leaving a function.
authorjilles <jilles@FreeBSD.org>
Sun, 10 Jan 2016 16:31:28 +0000 (16:31 +0000)
committerjilles <jilles@FreeBSD.org>
Sun, 10 Jan 2016 16:31:28 +0000 (16:31 +0000)
commitd42a26ab2089d53213cf28c22508023ea16e7efb
tree0b136c34e36d2b2c085d1618158aaa9df9b91c19
parent21632a9bd96fd68b505602bfdd4850ab1e18574a
sh: Update associated state when restoring locals while leaving a function.

Some variables like PATH call a function when modified. Make sure to call
this also when leaving a function where such a variable was made local.

Make sure to restore local variables before shellparam, so getopts state is
not clobbered.
bin/sh/eval.c
bin/sh/tests/builtins/Makefile
bin/sh/tests/builtins/local5.0 [new file with mode: 0644]
bin/sh/var.c