From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24509 invoked from network); 16 May 1999 21:54:01 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 16 May 1999 21:54:01 -0000 Received: (qmail 29192 invoked by alias); 16 May 1999 21:53:54 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6295 Received: (qmail 29185 invoked from network); 16 May 1999 21:53:53 -0000 X-Authentication-Warning: lion.microtal.com: news set sender to using -f Reply-To: From: "Arnon Kanfi" To: Subject: zsh bug Date: Sun, 16 May 1999 17:55:15 -0400 Message-ID: <000001be9fe6$c775e780$6b02800a@harpo.microtal.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2377.0 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2120.0 Hi, I have discovered a bug in zsh 3.1.4 when used on SunOs. when doing an "su" zsh will not read any of the global RC files. After tracking the problem I have found out that su on SunOs 4.1.4 sets argv[0] to "-su" which causes zsh to do "sh" emulation and not read the RC files. Enclosed is a small patch that fixes the problem on SunOs (I use the "SHELL" env variable which is set correctly to /usr/bin/zsh) In addition to that I ran into another problem on AIX 4.3 with EGCS. Were the generated executable could not be loaded because of alignment problems, See below: 0509-036 Cannot load program ./zsh because of the following errors: 0509-029 Alignment of text does not match required alignment. 0509-025 The ./zsh file is not executable or not in correct XCOFF format. 0509-026 System error: Cannot run a file that does not have a valid form Adding -H512 to the linker flags in the gcc specs file fixed the above problem. Hope that helps. Arnon diff -ubw /usr2/misc/tools/zsh-3.1.4/Src/main.c\~ /usr2/misc/tools/zsh-3.1.4/Src/main.c --- /usr2/misc/tools/zsh-3.1.4/Src/main.c~ Wed Apr 29 17:42:50 1998 +++ /usr2/misc/tools/zsh-3.1.4/Src/main.c Sun May 16 17:35:02 1999 @@ -43,6 +43,9 @@ init_hackzero(argv, environ); + if (strcmp(argv[0], "-su") == 0) + argv[0] = getenv("SHELL"); + for (t = argv; *t; *t = metafy(*t, -1, META_ALLOC), t++); if (!(zsh_name = strrchr(argv[0], '/'))) Diff finished at Sun May 16 17:38:39