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

Re: PATCH: POSIX_TRAPS option



On Sep 10,  8:31pm, Peter Stephenson wrote:
}
} It's high time we were able to treat EXIT traps the same way as other
} shells.

Hrm.  A couple of thoughts ...

(1) POSIX doesn't have anything to do with TRAPEXIT (or with any of
the other special TRAP functions).  Perhaps the POSIX_TRAPS option
should apply only to the "trap" builtin?  I don't feel very strongly
about it either way, but for example TRAPEXIT persists into subshells
whereas "trap" does not.

(2) The documentation should explain (somewhere) in what order the
EXIT trap and the zshexit hook function are executed.  Emprically,
zshexit is always last.



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