bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EXIT traps in interactive shells


From: Chet Ramey
Subject: Re: EXIT traps in interactive shells
Date: Sun, 29 Jul 2012 12:55:23 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:13.0) Gecko/20120614 Thunderbird/13.0.1

On 7/28/12 12:38 PM, Maarten Billemont wrote:
> Trapping on EXIT is a really convenient way of cleaning up after yourself 
> when your script ends.

I agree that the EXIT trap should work on {} asynchronous subshells, and I
will make sure that the next version of bash does this.

However, the two examples you gave don't really differ in that respect.  If
you take out the `kill', neither interactive nor non-interactive shells run
the exit trap.  The difference is how interactive and non-interactive
shells handle SIGTERM.  That's the place I'll have to look.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]