svn commit: r215266 - head/bin/sh
Jilles Tjoelker
jilles at FreeBSD.org
Sat Nov 13 22:10:27 UTC 2010
Author: jilles
Date: Sat Nov 13 22:10:26 2010
New Revision: 215266
URL: http://svn.freebsd.org/changeset/base/215266
Log:
sh: Do the additional actions if 'local -' restore changes -i/-m/-E/-V.
Example:
f() { local -; set +m; }; f
caused failure to execute external programs because the job control tty fd
was not opened.
Modified:
head/bin/sh/var.c
Modified: head/bin/sh/var.c
==============================================================================
--- head/bin/sh/var.c Sat Nov 13 22:04:48 2010 (r215265)
+++ head/bin/sh/var.c Sat Nov 13 22:10:26 2010 (r215266)
@@ -805,6 +805,7 @@ poplocalvars(void)
if (vp == NULL) { /* $- saved */
memcpy(optlist, lvp->text, sizeof optlist);
ckfree(lvp->text);
+ optschanged();
} else if ((lvp->flags & (VUNSET|VSTRFIXED)) == VUNSET) {
(void)unsetvar(vp->text);
} else {
More information about the svn-src-all
mailing list