zsh-users
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@ibmth.df.unipi.it>
To: Zsh users list <zsh-users@sunsite.auc.dk>
Subject: Re: .zlogout RE: Problem w/ ulimit killing compiles on sol 2.4&2.6 ...
Date: Thu, 04 Feb 1999 16:21:37 +0100	[thread overview]
Message-ID: <9902041521.AA66337@ibmth.df.unipi.it> (raw)

> 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@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


             reply	other threads:[~1999-02-04 15:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-04 15:21 Peter Stephenson [this message]
  -- strict thread matches above, loose matches on Subject: below --
1999-02-04 18:38 Phil Pennock
1999-02-04 15:34 Bart Schaefer
1999-02-04 14:30 Phil Pennock
1999-02-04 13:52 Andrej Borsenkow
1999-02-04 13:47 Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9902041521.AA66337@ibmth.df.unipi.it \
    --to=pws@ibmth.df.unipi.it \
    --cc=zsh-users@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).