From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2425 invoked from network); 7 Sep 2001 19:06:06 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 7 Sep 2001 19:06:06 -0000 Received: (qmail 19880 invoked by alias); 7 Sep 2001 19:05:55 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15748 Received: (qmail 19855 invoked from network); 7 Sep 2001 19:05:53 -0000 From: Bart Schaefer Message-Id: <1010907190526.ZM17902@candle.brasslantern.com> Date: Fri, 7 Sep 2001 19:05:26 +0000 In-Reply-To: <20010907193550.A5678@thelonious.new.ox.ac.uk> Comments: In reply to Adam Spiers "Switching shell safely and efficiently" (Sep 7, 7:35pm) References: <20010907193550.A5678@thelonious.new.ox.ac.uk> X-Mailer: Z-Mail (5.0.0 30July97) To: Adam Spiers , zsh-workers@sunsite.dk Subject: Re: Switching shell safely and efficiently MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Sep 7, 7:35pm, Adam Spiers wrote: } } Using exec is preferable, to avoid leaving loads of copies of bash } lying around in the process table doing nothing, but for me, the exec } has been known to fail (despite a -x check succeeding) due to library } mismatches between our various machines in the office. So I wanted } something that hit the sweet spot in the safety/efficiency trade-off run_shell=`$myshell -c "echo exec $myshell" || echo :` eval $run_shell '"$@"' -- 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