Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Infinite loop (bug in wordcode evaluation?)



The following function reproduces the bug in an interactive shell with ZLE
active:

    function hang() {
	emulate -L zsh
	trap return HUP INT QUIT                                         
	for ((i=0; 1; i=0)) do
            tmp=()                                                  
            vared -p "Type ^C here: " tmp                       
        done                            
    }

If you interrupt this with ^C, 3.1.6-dev.16 goes into a loop repeatedly
evaluating the "for" expressions on an empty loop body.  The "trap" is
important.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



Messages sorted by: Reverse Date, Date, Thread, Author