mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-29 06:42:45 +00:00
Fix $? at the first command of a function. The previous exit status was saved
twice and thus lost.
This commit is contained in:
parent
1f925d9161
commit
94c53a0811
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=185231
@ -791,6 +791,7 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
|
||||
for (sp = varlist.list ; sp ; sp = sp->next)
|
||||
mklocal(sp->text);
|
||||
funcnest++;
|
||||
exitstatus = oexitstatus;
|
||||
if (flags & EV_TESTED)
|
||||
evaltree(cmdentry.u.func, EV_TESTED);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user