1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

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.
This commit is contained in:
Jilles Tjoelker 2010-11-13 22:10:26 +00:00
parent 5f1818757a
commit 4a7b1013fb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=215266

View File

@ -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 {