From 4a7b1013fb4811b1ba715a350456249a99941ace Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Sat, 13 Nov 2010 22:10:26 +0000 Subject: [PATCH] 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. --- bin/sh/var.c | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/sh/var.c b/bin/sh/var.c index f5ea775728c8..3bba368ab56b 100644 --- a/bin/sh/var.c +++ b/bin/sh/var.c @@ -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 {