mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-09-27 06:22:20 +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)
|
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 ` #`
|
44133 debian #924736 (partial patch in 44134) three setopts following ` #`
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
44850 terminal issues with continuation markers
|
44850 terminal issues with continuation markers
|
||||||
|
@ -5720,6 +5720,8 @@ bin_break(char *name, char **argv, UNUSED(Options ops), int func)
|
|||||||
* a bad job.
|
* a bad job.
|
||||||
*/
|
*/
|
||||||
if (stopmsg || (zexit(0, ZEXIT_DEFERRED), !stopmsg)) {
|
if (stopmsg || (zexit(0, ZEXIT_DEFERRED), !stopmsg)) {
|
||||||
|
if (trap_state)
|
||||||
|
trap_state = TRAP_STATE_FORCE_RETURN;
|
||||||
retflag = 1;
|
retflag = 1;
|
||||||
breaks = loops;
|
breaks = loops;
|
||||||
exit_pending = 1;
|
exit_pending = 1;
|
||||||
|
@ -901,7 +901,7 @@ F:Must be tested with a top-level script rather than source or function
|
|||||||
fn trap1 trap2
|
fn trap1 trap2
|
||||||
echo out2
|
echo out2
|
||||||
'
|
'
|
||||||
-f:(workers/44007) function execution continues after 'exit' in trap
|
-:(workers/44007) function execution continues after 'exit' in trap
|
||||||
>out1
|
>out1
|
||||||
>fn1
|
>fn1
|
||||||
>trap1
|
>trap1
|
||||||
|
Loading…
Reference in New Issue
Block a user