Here is a patch with which all tests pass (the Zsh ones, including the new ones that the patch adds, and my tests mentioned in this thread). The patch does the following: - Revert change: 50929: fix handling of ERR_RETURN bent by 50928. - Revert change: 50928: fix tests for 50897, mention behavior change in NEWS - Revert change: 50897: nonzero status of complex commands should trigger ERR_EXIT - Add saving and restoring of local_noerrexit in doshfunc in exec.c - Add "this_noerrexit = 1;" at the very end of exectry in loop.c - Fix test "ERR_RETURN in "else" branch in nested function" in C03traps.ztst, to not affect tests coming afterwards - Add new tests in C03traps.ztst I'm not sure what to do in Changelog. Should I revert your changes or instead leave them and comment that the patch reverts them? Also, I have no clue how you obtain the change numbers (like 50929 and 50928). Philippe