mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-30 02:52:12 +01:00
22984: add zshexit hook
This commit is contained in:
parent
434d55da8b
commit
7929d97254
3 changed files with 12 additions and 0 deletions
|
@ -1,5 +1,8 @@
|
|||
2006-11-09 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 22984: Doc/Zsh/func.yo, Src/builtin.c: add zshexit hook
|
||||
to 22978.
|
||||
|
||||
* 22988: arno: Completion/Unix/Command/_make: failed on
|
||||
special variable names, so use local -h. Probably not a
|
||||
complete fix since the function can run recursivesly for
|
||||
|
|
|
@ -203,6 +203,14 @@ size-limited version of the command (with things like function bodies
|
|||
elided); the third argument contains the full text that is being
|
||||
executed.
|
||||
)
|
||||
findex(zshexit)
|
||||
vindex(zshexit_functions)
|
||||
item(tt(zshexit))(
|
||||
Executed at the point where the main shell is about to exit normally.
|
||||
This is not called by exiting subshells, nor when the tt(exec)
|
||||
precommand modifier is used before an external command. Also, unlike
|
||||
tt(TRAPEXIT), it is not called when functions exit.
|
||||
)
|
||||
item(tt(TRAP)var(NAL))(
|
||||
cindex(signals, trapping)
|
||||
cindex(trapping signals)
|
||||
|
|
|
@ -4436,6 +4436,7 @@ zexit(int val, int from_where)
|
|||
}
|
||||
if (sigtrapped[SIGEXIT])
|
||||
dotrap(SIGEXIT);
|
||||
callhookfunc("zshexit", NULL, 1);
|
||||
runhookdef(EXITHOOK, NULL);
|
||||
if (opts[MONITOR] && interact && (SHTTY != -1)) {
|
||||
release_pgrp();
|
||||
|
|
Loading…
Reference in a new issue