From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <19990204183857.A7590@fysh.org> Date: Thu, 4 Feb 1999 18:38:57 +0000 From: Phil Pennock To: Zsh users list Subject: Re: .zlogout RE: Problem w/ ulimit killing compiles on sol 2.4&2.6 ... Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailing-List: 2089 Typing away merrily, Peter Stephenson produced the immortal words: > > 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. I think I am. I meant: function exit_and_foo { function TRAPEXIT { exec foo } exit } defined and then just call exit_and_foo. -- --> Phil Pennock ; GAT d- s+:+ a23 C++(++++) UL++++/I+++/S+++/B++/H+$ P++@$ L+++ E-@ W(+) N>++ o !K w--- O>+ M V !PS PE Y+ PGP+ t-- 5++ X+ R !tv b++>+++ DI+ D+ G+ e+ h* r y?