Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: Re: zsh as sh hates `unset CDPATH'



> 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))



Messages sorted by: Reverse Date, Date, Thread, Author