zsh-workers
 help / color / mirror / code / Atom feed
From: Zoltan Hidvegi <hzoli@cs.elte.hu>
To: steve@xemacs.org (SL Baur)
Cc: zsh-workers@math.gatech.edu
Subject: PATCH: Re: zsh as sh hates `unset CDPATH'
Date: Thu, 14 May 1998 23:39:10 -0500 (CDT)	[thread overview]
Message-ID: <199805150439.XAA00949@hzoli.home> (raw)
In-Reply-To: <m2ogx0397l.fsf@altair.xemacs.org> from SL Baur at "May 14, 98 01:10:06 pm"

> zsh$ cd /tmp
> zsh$ ln -s /bin/zsh ./sh
> zsh$ ./sh
> sh$ unset CDPATH
> zsh: 20286 segmentation fault  ./sh
> zsh$ 

The patch below fixes this on 3.1.3.  It to patch 3.0.5, edit the patch
and remore the exp argument from unsetparm_pm (you have to remove it in
both side of the path), so that it looks like unserparm_pm(altpm, 1);

Zoli

*** Src/params.c.orig	Fri May  8 00:42:56 1998
--- Src/params.c	Thu May 14 23:34:53 1998
*************** unsetparam_pm(Param pm, int altflag, int
*** 1335,1341 ****
      /* remove it under its alternate name if necessary */
      if (pm->ename && !altflag) {
  	altpm = (Param) paramtab->getnode(paramtab, pm->ename);
! 	unsetparam_pm(altpm, 1, exp);
      }
  
      if (locallevel >= pm->level && (pm->flags & PM_SPECIAL))
--- 1335,1342 ----
      /* remove it under its alternate name if necessary */
      if (pm->ename && !altflag) {
  	altpm = (Param) paramtab->getnode(paramtab, pm->ename);
! 	if (altpm)
! 	    unsetparam_pm(altpm, 1, exp);
      }
  
      if (locallevel >= pm->level && (pm->flags & PM_SPECIAL))


  reply	other threads:[~1998-05-15  4:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-05-14 20:10 SL Baur
1998-05-15  4:39 ` Zoltan Hidvegi [this message]
1998-05-15  6:00   ` PATCH: " SL Baur

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=199805150439.XAA00949@hzoli.home \
    --to=hzoli@cs.elte.hu \
    --cc=steve@xemacs.org \
    --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).