Subject: Re: csh bug
To: Christos Zoulas <christos@zoulas.com>
From: Michael Shalayeff <mickey@lucifier.remote.dti.net>
List: netbsd-bugs
Date: 09/04/2000 11:25:09
Making, drinking tea and reading an opus magnum from Christos Zoulas:
> On Aug 29, 9:54pm, mickey@lucifier.remote.dti.net (Michael Shalayeff) wrote:
> -- Subject: csh bug
>
> Hi Michael,
re
> can you please send also an example that exercises the bug?
oh, sorry.
env PATH='/a/*/d/b/g' csh
> | Index: csh.c
> | ===================================================================
> | RCS file: /cvs/src/bin/csh/csh.c,v
> | retrieving revision 1.10
> | diff -u -r1.10 csh.c
> | --- csh.c 1999/02/21 08:28:00 1.10
> | +++ csh.c 2000/08/30 01:43:02
> | @@ -522,6 +522,7 @@
> | * start-up scripts.
> | */
> | reenter = setexit(); /* PWP */
> | + exitset++;
> | haderr = 0; /* In case second time through */
> | if (!fast && reenter == 0) {
> | /* Will have value(STRhome) here because set fast if don't */
> | Index: csh.h
> | ===================================================================
> | RCS file: /cvs/src/bin/csh/csh.h,v
> | retrieving revision 1.5
> | diff -u -r1.5 csh.h
> | --- csh.h 1999/08/06 20:41:04 1.5
> | +++ csh.h 2000/08/30 01:43:03
> | @@ -185,6 +185,7 @@
> |
> | #include <setjmp.h>
> | jmp_buf reslab;
> | +int exitset;
> |
> | #define setexit() (setjmp(reslab))
> | #define reset() longjmp(reslab, 1)
> | Index: error.c
> | ===================================================================
> | RCS file: /cvs/src/bin/csh/error.c,v
> | retrieving revision 1.2
> | diff -u -r1.2 error.c
> | --- error.c 1997/11/15 21:51:28 1.2
> | +++ error.c 2000/08/30 01:43:03
> | @@ -398,7 +398,7 @@
> | /*
> | * Go away if -e or we are a child shell
> | */
> | - if (exiterr || child)
> | + if (!exitset || exiterr || child)
> | xexit(1);
> |
> | /*
> | --
> | paranoic mickey (my employers have changed but, the name has remained)
> -- End of excerpt from Michael Shalayeff
>
--
paranoic mickey (my employers have changed but, the name has remained)