From 3f0530abee81a62f516046286408f1c1bcf15a33 Mon Sep 17 00:00:00 2001 From: sheldonh Date: Mon, 19 Jul 1999 11:00:33 +0000 Subject: [PATCH] Fix handling of the cd command inside evaluations. It was changing PWD, which it should not do. PR: 12578 Reported by: Gerald Pfeifer Submitted by: Niall Smart --- bin/sh/eval.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/sh/eval.c b/bin/sh/eval.c index 2a1e760926cd..4c762bad3e56 100644 --- a/bin/sh/eval.c +++ b/bin/sh/eval.c @@ -39,7 +39,7 @@ static char sccsid[] = "@(#)eval.c 8.9 (Berkeley) 6/8/95"; #endif static const char rcsid[] = - "$Id: eval.c,v 1.18 1999/04/21 11:52:39 cracauer Exp $"; + "$Id: eval.c,v 1.19 1999/05/08 10:21:46 kris Exp $"; #endif /* not lint */ #include @@ -712,6 +712,7 @@ evalcommand(cmd, flags, backcmd) && ((flags & EV_EXIT) == 0 || Tflag)) || ((flags & EV_BACKCMD) != 0 && (cmdentry.cmdtype != CMDBUILTIN + || cmdentry.u.index == CDCMD || cmdentry.u.index == DOTCMD || cmdentry.u.index == EVALCMD))) { jp = makejob(cmd, 1);