From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16944 invoked from network); 29 Mar 2001 06:00:00 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 29 Mar 2001 06:00:00 -0000 Received: (qmail 1746 invoked by alias); 29 Mar 2001 05:59:53 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13825 Received: (qmail 1732 invoked from network); 29 Mar 2001 05:59:52 -0000 From: "Bart Schaefer" Message-Id: <1010329055823.ZM17574@candle.brasslantern.com> Date: Thu, 29 Mar 2001 05:58:23 +0000 In-Reply-To: Comments: In reply to Tanaka Akira "trap problem." (Mar 29, 12:39pm) References: X-Mailer: Z-Mail (5.0.0 30July97) To: Tanaka Akira , zsh-workers@sunsite.dk Subject: Re: trap problem. MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Mar 29, 12:39pm, Tanaka Akira wrote: } Subject: trap problem. } } trap doesn't work as follows. } } % Src/zsh --version } zsh 4.0.1-pre-2 (i386-unknown-freebsd4.2) } % Src/zsh -fc 'trap "echo INT" INT; sleep 60' } ^C } % } } It should print `INT' but it doesn't. That's because zsh has been extremely clever and has `exec'd "sleep 60", so there's no zsh process around any more to execute the trap. Try: Src/zsh -fc 'trap "echo INT" INT; sleep 60; sleep 1' and you'll see ... Perhaps zsh's tests for whether the last command can be `exec'd should include testing whether there are any user-defined traps in effect? -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net