mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-05-30 03:46:05 +02:00
50897: nonzero status of complex commands should trigger ERR_EXIT
This commit is contained in:
parent
298919f43a
commit
d873ed6026
|
@ -1,3 +1,8 @@
|
||||||
|
2022-11-08 Bart Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
|
* 50897: Src/exec.c, Src/loop.c: nonzero status of complex
|
||||||
|
commands should trigger ERR_EXIT
|
||||||
|
|
||||||
2022-11-08 Peter Stephenson <p.stephenson@samsung.com>
|
2022-11-08 Peter Stephenson <p.stephenson@samsung.com>
|
||||||
|
|
||||||
* users/28338: Src/lex.c, Test/D08cmdsubst.ztst: edge case of an
|
* users/28338: Src/lex.c, Test/D08cmdsubst.ztst: edge case of an
|
||||||
|
|
|
@ -451,7 +451,7 @@ execcursh(Estate state, int do_exec)
|
||||||
cmdpop();
|
cmdpop();
|
||||||
|
|
||||||
state->pc = end;
|
state->pc = end;
|
||||||
this_noerrexit = 1;
|
this_noerrexit = (WC_SUBLIST_TYPE(*end) != WC_SUBLIST_END);
|
||||||
|
|
||||||
return lastval;
|
return lastval;
|
||||||
}
|
}
|
||||||
|
|
12
Src/loop.c
12
Src/loop.c
|
@ -208,7 +208,7 @@ execfor(Estate state, int do_exec)
|
||||||
loops--;
|
loops--;
|
||||||
simple_pline = old_simple_pline;
|
simple_pline = old_simple_pline;
|
||||||
state->pc = end;
|
state->pc = end;
|
||||||
this_noerrexit = 1;
|
this_noerrexit = (WC_SUBLIST_TYPE(*end) != WC_SUBLIST_END);
|
||||||
return lastval;
|
return lastval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -336,7 +336,7 @@ execselect(Estate state, UNUSED(int do_exec))
|
||||||
loops--;
|
loops--;
|
||||||
simple_pline = old_simple_pline;
|
simple_pline = old_simple_pline;
|
||||||
state->pc = end;
|
state->pc = end;
|
||||||
this_noerrexit = 1;
|
this_noerrexit = (WC_SUBLIST_TYPE(*end) != WC_SUBLIST_END);
|
||||||
return lastval;
|
return lastval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -478,7 +478,7 @@ execwhile(Estate state, UNUSED(int do_exec))
|
||||||
popheap();
|
popheap();
|
||||||
loops--;
|
loops--;
|
||||||
state->pc = end;
|
state->pc = end;
|
||||||
this_noerrexit = 1;
|
this_noerrexit = (WC_SUBLIST_TYPE(*end) != WC_SUBLIST_END);
|
||||||
return lastval;
|
return lastval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -532,7 +532,7 @@ execrepeat(Estate state, UNUSED(int do_exec))
|
||||||
loops--;
|
loops--;
|
||||||
simple_pline = old_simple_pline;
|
simple_pline = old_simple_pline;
|
||||||
state->pc = end;
|
state->pc = end;
|
||||||
this_noerrexit = 1;
|
this_noerrexit = (WC_SUBLIST_TYPE(*end) != WC_SUBLIST_END);
|
||||||
return lastval;
|
return lastval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -587,7 +587,7 @@ execif(Estate state, int do_exec)
|
||||||
lastval = 0;
|
lastval = 0;
|
||||||
}
|
}
|
||||||
state->pc = end;
|
state->pc = end;
|
||||||
this_noerrexit = 1;
|
this_noerrexit = (WC_SUBLIST_TYPE(*end) != WC_SUBLIST_END);
|
||||||
|
|
||||||
return lastval;
|
return lastval;
|
||||||
}
|
}
|
||||||
|
@ -701,7 +701,7 @@ execcase(Estate state, int do_exec)
|
||||||
|
|
||||||
if (!anypatok)
|
if (!anypatok)
|
||||||
lastval = 0;
|
lastval = 0;
|
||||||
this_noerrexit = 1;
|
this_noerrexit = (WC_SUBLIST_TYPE(*end) != WC_SUBLIST_END);
|
||||||
|
|
||||||
return lastval;
|
return lastval;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue