zsh-workers
 help / color / mirror / code / Atom feed
From: "Arnon Kanfi" <arnon@microtal.com>
To: <zsh-workers@math.gatech.edu>
Subject: zsh bug
Date: Sun, 16 May 1999 17:55:15 -0400	[thread overview]
Message-ID: <000001be9fe6$c775e780$6b02800a@harpo.microtal.com> (raw)

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


             reply	other threads:[~1999-05-16 21:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-16 21:55 Arnon Kanfi [this message]
1999-05-17  9:17 ` PATCH: 3.1.5-pws-18: " Peter Stephenson
1999-05-19  8:57   ` PATCH: 3.1.5-pws-18: Re: zsh bug, again Peter Stephenson
     [not found] <qrr3e0q76lb.fsf@elwha.cs.washington.edu>
     [not found] ` <gjb@cs.washington.edu>
1999-05-24  1:29   ` zsh bug Glenn Trigg
1999-05-24  1:48     ` Geoff Wing
2007-11-05 20:30 Drew Middlesworth
2007-11-06 10:13 ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000001be9fe6$c775e780$6b02800a@harpo.microtal.com' \
    --to=arnon@microtal.com \
    --cc=arnonk@microtal.com \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).