Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: hzoli13 another bug ?
- X-seq: zsh-workers 855
- From: Zoltan Hidvegi <hzoli@xxxxxxxxxx>
- To: gene@xxxxxxxxxxxx (Gene Cohler)
- Subject: Re: hzoli13 another bug ?
- Date: Mon, 25 Mar 1996 13:50:44 +0100 (MET)
- Cc: zsh-workers@xxxxxxxxxxxxxxx (zsh-workers)
- In-reply-to: <9603242016.ZM20938@xxxxxxxxxxxxxxxxxxx> from Gene Cohler at "Mar 24, 96 08:16:46 pm"
- Organization: Dept. of Comp. Sci., Eotvos University, Budapest, Hungary
- Phone: (36 1)2669833 ext: 2667, home phone: (36 1) 2752368
> Hey Zoltan:
>
> I have run into another problem.
>
> After assigning result code of execution to a variable it has wrong value:
>
> % egrep -q $u $DbFile
> % echo $?
> 1
> % egrep -q $u $DbFile
> % rc=$?
> % echo $rc
> 0
>
> Again this is not in the stock beta13 version.
A patch in art. 637 from Zefram broke this. It tried to fix a bug when an
assignment like wibble=$(false) did not set $?. Everyone who applied the
patch in art. 637 (i.e. everyone using beta13-hzoli13) should also apply
the patch below.
Bye,
Zoltan
*** Src/exec.c 1996/03/22 21:33:31 1.15
--- Src/exec.c 1996/03/25 12:41:37
***************
*** 1174,1182 ****
} else
addlinknode(args, dupstring(nullcmd));
} else {
- lastval = 0;
addvars(cmd->vars, 0);
! if(errflag) lastval = errflag;
if (isset(XTRACE)) {
fputc('\n', stderr);
fflush(stderr);
--- 1174,1184 ----
} else
addlinknode(args, dupstring(nullcmd));
} else {
addvars(cmd->vars, 0);
! if(errflag)
! lastval = errflag;
! else
! lastval = 0;
if (isset(XTRACE)) {
fputc('\n', stderr);
fflush(stderr);
Messages sorted by:
Reverse Date,
Date,
Thread,
Author