From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15487 invoked from network); 20 Dec 2004 21:21:26 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 20 Dec 2004 21:21:26 -0000 Received: (qmail 53001 invoked from network); 20 Dec 2004 21:21:20 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 20 Dec 2004 21:21:20 -0000 Received: (qmail 12027 invoked by alias); 20 Dec 2004 21:21:06 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20631 Received: (qmail 8277 invoked from network); 20 Dec 2004 20:21:06 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 20 Dec 2004 20:21:06 -0000 Received: (qmail 13641 invoked from network); 20 Dec 2004 20:21:06 -0000 Received: from mournblade.cat.pdx.edu (131.252.208.27) by a.mx.sunsite.dk with SMTP; 20 Dec 2004 20:21:04 -0000 Received: from alan.cs.pdx.edu (alan.cs.pdx.edu [131.252.209.202]) by mournblade.cat.pdx.edu (8.13.1/8.13.1) with ESMTP id iBKKL0Df011857 for ; Mon, 20 Dec 2004 12:21:00 -0800 (PST) Received: from alan.cs.pdx.edu (localhost.localdomain [127.0.0.1]) by alan.cs.pdx.edu (8.13.1/8.12.10) with ESMTP id iBKKKxWh032618 for ; Mon, 20 Dec 2004 12:20:59 -0800 Received: (from tspencer@localhost) by alan.cs.pdx.edu (8.13.1/8.13.1/Submit) id iBKKKx72032617 for zsh-workers@sunsite.dk; Mon, 20 Dec 2004 12:20:59 -0800 Date: Mon, 20 Dec 2004 12:20:59 -0800 From: Travis Spencer To: zsh-workers@sunsite.dk Subject: Zsh killed when autoloaded function calls mislinked program Message-ID: <20041220202059.GE11940@alan.cs.pdx.edu> Reply-To: Travis Spencer Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: All mail clients sucks. This one just sucks less. X-Virus-Scanned: by amavisd-new X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=-0.0 required=6.0 tests=BAYES_44 autolearn=no version=2.63 X-Spam-Hits: -0.0 I've found that invoking an autoloaded function that calls a program that isn't linked correctly kills zsh. Here is the function that does this: #!/usr/bin/zsh local grep if [[ -x /stash/travissu/bin/grep ]] && /stash/travissu/bin/grep test /dev/null 2>/dev/null ; then grep=(/stash/travissu/bin/grep) else grep=(grep) fi command $grep $* Here is what happens when i run /stash/travissu/bin/grep from the shell: zsh> /stash/travissu/bin/grep ld.so.1: /stash/travissu/bin/grep: fatal: libgcc_s.so.1: open failed: No such file or directory zsh: killed /stash/travissu/bin/grep zsh> Now, if I chmod the script so it has execute permission, I get this: zsh> echo $path | ./fn test zsh> However, if I autoload it like this: zsh> autoload -U fn zsh> fn Usage: grep [OPTION]... PATTERN [FILE]... Try `grep --help' for more information. zsh> When I execute the autoloaded function, I get this: zsh> echo $path | fn Killed tcsh> Where tcsh is the shell I started zsh from. I am using zsh 4.2.1 on Solaris 9. -- Regards, Travis Spencer