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

Can INT trap leave entire function stack



Hello,
I do:

myfun() {
    setopt localtraps
    trap "return" TERM INT QUIT
    trap "-morlib_end" EXIT

    otherfun
    sleep 60
}

to have -morlib_end nicely called at any exit of function. The problem
is, if the code enters sub-function "otherfun", Ctrl-C interrupts that
function, and one other Ctrl-C is needed. I would like to leave entire
function stack if that's possible. Is there any trick?

Best regards,
Sebastian Gniazdowski



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