summaryrefslogtreecommitdiff
path: root/Src/exec.c
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2015-06-02 00:41:20 +0200
committerAxel Beckert <abe@deuxchevaux.org>2015-06-02 00:41:20 +0200
commit752cbfd48ab774e3de0ecf49543fe748a03406df (patch)
treea78726bf01b008c9b60f84257210b45870da09dd /Src/exec.c
parent8b373331f539bedc68aa74b1fe0472151f1bea68 (diff)
parentf0068edb4888a4d8fe94defa9c7affaa15e917c9 (diff)
downloadzsh-752cbfd48ab774e3de0ecf49543fe748a03406df.tar.gz
zsh-752cbfd48ab774e3de0ecf49543fe748a03406df.zip
New upstream release: Merge tag 'zsh-5.0.8' / branch 'upstream' into 'debian'.
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/Src/exec.c b/Src/exec.c
index 527d61197..9f163a627 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -4910,9 +4910,11 @@ doshfunc(Shfunc shfunc, LinkList doshargs, int noreturnval)
if (!(flags & PM_UNDEFINED))
scriptname = dupstring(name);
oldzoptind = zoptind;
- zoptind = 1;
oldoptcind = optcind;
- optcind = 0;
+ if (!isset(POSIXBUILTINS)) {
+ zoptind = 1;
+ optcind = 0;
+ }
/* We need to save the current options even if LOCALOPTIONS is *
* not currently set. That's because if it gets set in the *
@@ -5049,8 +5051,10 @@ doshfunc(Shfunc shfunc, LinkList doshargs, int noreturnval)
argzero = oargv0;
}
pparams = pptab;
- optcind = oldoptcind;
- zoptind = oldzoptind;
+ if (!isset(POSIXBUILTINS)) {
+ zoptind = oldzoptind;
+ optcind = oldoptcind;
+ }
scriptname = oldscriptname;
oflags = ooflags;