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

Re: How to trap EXIT like in bash



On Apr 4, 10:45pm, Thorsten Kampe wrote:
}
} It gets even weirder: neither `kill -HUP`, nor `kill -INT` nor `kill 
} -TERM` with the PID of the shell have any influence on the script if 
} these signals are trapped. What does have an influence is a Ctrl-C 
} and `kill -KILL`. 

This is still NO_TRAPS_ASYNC.  Ctrl-C from the terminal is sent to the
whole process group, so both zsh and the child get the signal and the
trap is run effectively immediately (because the child has exited).

KILL isn't trappable, so zsh can't delay handling that.



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