Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: .zlogout RE: Problem w/ ulimit killing compiles on sol 2.4&2.6 ...
- X-seq: zsh-users 2085
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>
- To: Zsh users list <zsh-users@xxxxxxxxxxxxxx>
- Subject: Re: .zlogout RE: Problem w/ ulimit killing compiles on sol 2.4&2.6 ...
- Date: Thu, 04 Feb 1999 16:21:37 +0100
> Does a reminder about the effect of exec belong in the manual or the
> FAQ?
Well, there's no harm in being explicit (this patch is a
replacement).
> For those who really want maintenance logs or whatever, but still want
> to exec something (an interruptible secure program), I usually suggest a
> function/alias that does a TRAPEXIT/trap '' 0 -- is this really the
> best idea?
The exit trap isn't run before an exec, for just the same reason that
.zlogout isn't, i.e. the shell isn't exiting, it's overlaying a
process without forking first. I should think the only thing you can
do is hook into exec itself by an alias or function. But the securer
you want to be, the better it probably is just to call whatever
explicitly before the exec. Unless you're saying something slightly
different to what I've understood.
--- Doc/Zsh/files.yo.logout Wed Jun 3 00:00:27 1998
+++ Doc/Zsh/files.yo Thu Feb 4 16:11:49 1999
@@ -20,6 +20,12 @@
Finally, if the shell is a login shell, tt(/etc/zlogin) and
tt($ZDOTDIR/.zlogin) are read.
+When a login shell exits, the files tt($ZDOTDIR/.zlogout) and then
+tt(/etc/zlogout) are read. This happens with either an explicit exit
+via the tt(exit) or tt(logout) commands, or an implict exit by reading
+end-of-file from the terminal. However, if the shell terminates due
+to tt(exec)'ing another process, the logout files are not read.
+
If tt(ZDOTDIR) is unset, tt(HOME) is used instead.
Those files listed above as being in tt(/etc) may be in another
directory, depending on the installation.
--
Peter Stephenson <pws@xxxxxxxxxxxxxxxxx> Tel: +39 050 844536
WWW: http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy
Messages sorted by:
Reverse Date,
Date,
Thread,
Author