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

Re: zsh dumping core because I don't grok TRAPEXIT



On Sep 7,  6:04pm, Sweth Chandramouli wrote:
}
} (astaroth)/tmp/zsh_is_wonky: echo $ZSH_VERSION
} 3.1.9
} 
} 	; I know that 4.0.2 is out now, but I just haven't had a
} chance to install it yet.

You need to install 4.0.2, or at least 3.1.9-dev-2+, because there were
several bug fixes in memory management of the exit trap handler shortly
after the 3.1.9 release.  This is almost certainly what is causing your
core dump.

} I'd still like to know how TRAPEXIT is really supposed to work

I'd like to know why mutt is exiting with 23.  It doesn't when I try it.

Anyway, TRAPEXIT is supposed to work pretty much like you thought it was.
It's the only trap-function that -always- behaves as if LOCAL_TRAPS is
set (which is how it got memory-management problems in the first place).
That is, the exit trap applies to all functions and subshells called
from the function that defines it, but it becomes undefined after it
is called when the defining function exits.

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

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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