mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-05-13 11:06:17 +02:00
50068: 'exit' in trap causes calling function to return
This commit is contained in:
parent
0ad3b11a13
commit
d24d7242fe
3
Etc/BUGS
3
Etc/BUGS
|
@ -30,9 +30,6 @@ skipped when STTY=... is set for that command
|
|||
------------------------------------------------------------------------
|
||||
42609: :|: =(hang)
|
||||
------------------------------------------------------------------------
|
||||
44007 - Martijn - exit in trap executes rest of function
|
||||
See test case in Test/C03traps.ztst.
|
||||
------------------------------------------------------------------------
|
||||
44133 debian #924736 (partial patch in 44134) three setopts following ` #`
|
||||
------------------------------------------------------------------------
|
||||
44850 terminal issues with continuation markers
|
||||
|
|
|
@ -5720,6 +5720,8 @@ bin_break(char *name, char **argv, UNUSED(Options ops), int func)
|
|||
* a bad job.
|
||||
*/
|
||||
if (stopmsg || (zexit(0, ZEXIT_DEFERRED), !stopmsg)) {
|
||||
if (trap_state)
|
||||
trap_state = TRAP_STATE_FORCE_RETURN;
|
||||
retflag = 1;
|
||||
breaks = loops;
|
||||
exit_pending = 1;
|
||||
|
|
|
@ -901,7 +901,7 @@ F:Must be tested with a top-level script rather than source or function
|
|||
fn trap1 trap2
|
||||
echo out2
|
||||
'
|
||||
-f:(workers/44007) function execution continues after 'exit' in trap
|
||||
-:(workers/44007) function execution continues after 'exit' in trap
|
||||
>out1
|
||||
>fn1
|
||||
>trap1
|
||||
|
|
Loading…
Reference in New Issue